205 Posted Topics

Member Avatar for forneamax

Add KeyPress event to the TextBox and use this code: [CODE] private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { int isNum = 0; if (e.KeyChar == ',') e.Handled = false; else if (!int.TryParse(e.KeyChar.ToString(), out isNum)) e.Handled = true; } [/CODE] Hope that helps. Thanks

Member Avatar for forneamax
0
2K
Member Avatar for «¤¦PR☼GRAM¦¤»

Use this code: [CODE] For Each carrier In carriers [B] Dim fileName as String = IO.Path.GetFileNameWithoutExtension(carrier.FullName)[/B] ComboBox2.Items.Add([B]fileName[/B])'adds filename into textbox Next [/CODE]

Member Avatar for «¤¦PR☼GRAM¦¤»
0
150
Member Avatar for Dcurvez
Member Avatar for NPDA

Do you mean when the form is closed and then reopened? If so, then you'll have to use the [I]Settings[/I] class. Have a look here: [url]http://www.codeproject.com/KB/cs/PropertiesSettings.aspx[/url] Thanks

Member Avatar for farooqaaa
0
54
Member Avatar for Learner7

MsgBox() function returns a DialogResult of the given type (in your case its "Yes" or "No"). See how its used: [CODE] If (MsgBox("Do you really want to delete this row ?", MsgBoxStyle.YesNo) = DialogResult.Yes) Then With MyCommand .Connection = modConnection.MyConnection .CommandText = "Delete from Contacts where TAID=" & Val(LVW.Tag) & …

Member Avatar for Learner7
0
130
Member Avatar for Lee21

Use this code: [I] There might be some synatx errors. Sorry for that. I don't have VB.NET installed.[/I] [CODE] Public Class Form1 Dim frm2 As New Form2 Function CheckForm(ByVal f as Form) As Boolean Dim openForm as Form Foreach openForm in Application.OpenForms if openForm == f Then return (true) End …

Member Avatar for Luc001
0
144
Member Avatar for basma.lm

Here's an example: [B]Form1's Constructor:[/B] [code] Form2 form2; public Form1() { InitializeComponent(); form2 = new Form2(this); } [/code] [B]Form2's Constructor:[/B] [code] Form1 form1; public Form2(Form1 F) { InitializeComponent(); form1 = F; } [/code] Now set the Modifiers property of the control (on any form) to "Public": [img]http://i.imgur.com/IzNSu.jpg[/img] And you can …

Member Avatar for basma.lm
0
524
Member Avatar for jamal87

Add this under "Public class Form1 ....": [CODE]Dim count As Integer = 100[/CODE] Add a label to the form. Add this to the Button_Click event code: [CODE]Timer1.Start()[/CODE] Double-click the timer to add the Timer_Tick event and use this code: [CODE]count -= 1 Label1.Text = count [/CODE] Thanks

Member Avatar for L0u3
0
76
Member Avatar for tqmd1

Add KeyPress event for your textbox and use this code: [CODE]If Asc(e.KeyChar) <> 13 AndAlso Asc(e.KeyChar) <> 8 _ AndAlso Not IsNumeric(e.KeyChar) Then e.Handled = True End If[/CODE]

Member Avatar for TomW
0
179
Member Avatar for nevds

Add a DoubleClick event for the checkedListBox and call the "checkedListBox1_SelectedIndexChanged" event from there. Like this: [CODE]Private Sub CheckedListBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckedListBox1.DoubleClick CheckedListBox1_SelectedIndexChanged(Nothing, Nothing) End Sub}[/CODE] Thanks

Member Avatar for Geekitygeek
0
126
Member Avatar for GoS-ExiGo

This will help: [url]http://dotnetstep.blogspot.com/2009/06/remove-focus-rectangle-from-button.html[/url] Thanks

Member Avatar for Diamonddrake
0
105
Member Avatar for zeeven

I recommend you [B][URL="http://www.jrsoftware.org/isinfo.php"]InnoSetup[/URL][/B]. Its the best one I've ever used and it is highly customizable.

Member Avatar for JuhaW
0
104
Member Avatar for killerbeat

Try this: [url]http://www.g4hq.com/forum/showthread.php/19021-%5BVB-Net%5DDisable-Enable-Internet-Explorer-s-clicking-sound[/url] Thanks

Member Avatar for Thyoric
0
609
Member Avatar for darcee

Use this Sub or modify ClickButton2: [CODE]Public Sub ClickAHref(ByRef wb As WebBrowser, ByRef id As String) 'Submit button Dim theElementCollection As HtmlElementCollection [COLOR="Red"][B]theElementCollection = wb.Document.GetElementsByTagName("a")[/B][/COLOR] For Each curElement2 As HtmlElement In theElementCollection If curElement2.GetAttribute("id").Equals(id) Then curElement2.InvokeMember("click") Do While wb.ReadyState <> WebBrowserReadyState.Complete Application.DoEvents() Loop End If Next End Sub[/CODE]

Member Avatar for darcee
0
155
Member Avatar for boris_rk

You can use WebClient: [CODE]System.Net.WebClient client = new System.Net.WebClient(); // This is where the downloaded file will be saved string saveFileName = "C:\\abc.exe"; client.DownloadFile("http://website.com/abc.exe", saveFileName);[/CODE] Thanks

Member Avatar for boris_rk
0
76
Member Avatar for DesperateDan

[quote]to my code and got the following error “ Name OK is not declared “.....[/quote] Replace [I]OK[/I] with the name of the OK button, like: okButtonName.CausesValidation = false Thanks

Member Avatar for DesperateDan
0
143
Member Avatar for Elemen7s

And also you have put killname inside doublequotes ( " ). Here's the working version: [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; namespace killer { public partial class Form1 : Form { [B]string killname = String.Empty;[/B] public Form1() { …

Member Avatar for Elemen7s
0
97
Member Avatar for sayeedbd

Doing it in VB.NET is going to be really hard. You can use this good tool instead of making your own: [url]http://download.cnet.com/Folder-Lock/3000-2092_4-10063343.html[/url] Thanks

Member Avatar for sayeedbd
0
191
Member Avatar for makdu

Check this: [url]http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!2185/lngWid!10/anyname.htm[/url] Thanks

Member Avatar for makdu
0
2K
Member Avatar for liqin
Member Avatar for amadaeliseo

HTML is already XML. Anyway, What are you trying to do? [QUOTE]I used HTMLTidy to do this converting HTML to XHTML....[/QUOTE] I don't think he is talking about [I]XHTML[/I]. He's talking about XML.

Member Avatar for MrTelly
0
102
Member Avatar for liqin

Put the centralizing code before the maximize: [CODE] Me.Left = (Screen.PrimaryScreen.Bounds.Width \ 2) - (Me.Width \ 2) Me.Top = (Screen.PrimaryScreen.Bounds.Height \ 2) - (Me.Height \ 2) Me.StartPosition = FormStartPosition.CenterScreen Me.WindowState = FormWindowState.Maximized[/CODE] Thanks

Member Avatar for QVeen72
0
117
Member Avatar for learn_vb.net

That isn't VB.NET code you are using C# for the button_click event. [QUOTE="learn_vb.net]i am not getting display[/QUOTE] What do you mean? Do you see an empty form (without a button) or nothing shows up at all?

Member Avatar for learn_vb.net
0
96
Member Avatar for goody11

Declare [I]random[/I] variable at class-level and then change the [I]RandomNumber[/I] method like this this: [CODE]public class Enemy : Sprite { // Declared at class-level Random random = new Random(); private int RandomNumber(int min, int max) { return random.Next(min, max); } .......[/CODE]

Member Avatar for ddanbe
0
125
Member Avatar for moroshko

Here's a simple tutorial that will show you how to draw using mouse: [url]http://www.farooqazam.net/draw-a-rectangle-in-c-sharp-using-mouse[/url] Thanks

Member Avatar for pauldani
0
259
Member Avatar for reyarita
Member Avatar for jonsca
0
155
Member Avatar for j4jawaid

Try these: [CODE]string anchorText = aTags[0].InnerHtml; anchorText = aTags[0].InnerText;[/CODE] I don't know which one gets you the anchor text because I don't have a compiler at the moment. Can't test the code. Try both and let me know which one worked :D. Thanks

Member Avatar for j4jawaid
0
148
Member Avatar for jfoster80

Your code is good. I don't see any problems with it. For what do you want to use lists in GUI? Be more specific, please. Thanks

Member Avatar for jfoster80
0
294
Member Avatar for shmukle

Change the TextAnalyzer method to this: [CODE] static public void TextAnalyzer(string EInput) { if (EInput == "weather") { Console.WriteLine("I would love to talk about the weather"); Console.ReadLine(); } } [/CODE] Thanks

Member Avatar for farooqaaa
0
131
Member Avatar for shabeg

Have a look at this article: [url]http://www.csharphelp.com/2007/05/avoid-c-memory-leaks-with-destructor-and-dispose/[/url] Thanks

Member Avatar for sknake
0
1K
Member Avatar for NargalaX

Well.. I think it will work this way: [CODE] string newString = textBox1.Text; char[] separators = new char[] { ' ', '/', '*', '+', '-' }; // This adds a "<" before & after each separator for (int i = 0; i < separators.Length; i++) { string str = separators[i].ToString(); …

Member Avatar for farooqaaa
0
169
Member Avatar for forneamax

Yes, it can used. But you must assign a value outside the try {} block. Assign a default value to [I]response[/I]: [CODE]char response = '0';[/CODE] Thanks

Member Avatar for forneamax
0
6K
Member Avatar for naren7

Something like: [CODE]textBox1.KeyPress += new KeyPressEventHandler(textBox1_KeyPress); private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { textBox1.Width = 20; }[/CODE] Thanks

Member Avatar for sknake
0
121
Member Avatar for agilson

Yes, but instead of using variables you should use an array. Try this code: [CODE]int numberOfBoxes = 10; TextFrame[] BodyCopyBoxes = new TextFrame[numberOfBoxes]; BodyCopyBoxes[0] = (TextFrame)doc.FindElement("BodyCopyBox"); BodyCopyBoxes[1] = (TextFrame)doc.FindElement("BodyCopyBox1"); BodyCopyBoxes[2] = (TextFrame)doc.FindElement("BodyCopyBox2"); BodyCopyBoxes[3] = (TextFrame)doc.FindElement("BodyCopyBox3"); BodyCopyBoxes[4] = (TextFrame)doc.FindElement("BodyCopyBox4"); // Loop through all the boxes for (int i = 0; i …

Member Avatar for agilson
0
111
Member Avatar for ali_khodayar

There are many ways to do that. Try this: In Form2, set the Modifiers property of textbox1 to "Public". If you want to get access to Form1's textbox in Form2 then also do this for the textbox in Form1.[I][URL="http://img300.imageshack.us/img300/148/capture71679.jpg"](screenshot)[/URL][/I] And use this code in Form1: [CODE] Form2 form2; public Form1() …

Member Avatar for farooqaaa
0
114
Member Avatar for DotA

Use this code: [CODE]device.DrawPrimitives(PrimitiveType.TriangleList, 0, verts.Length/3)[/CODE] Let me know if that works. Thanks

Member Avatar for DotA
0
261
Member Avatar for sidd.

StreamReader.Read takes char[] as the first argument not byte[]. Use this code if you want to use char[] array instead of byte[]: [CODE] char[] str = new char[12]; for(i=0; i < lenght_of_file; i++) { sr.Read(str,i,1); } [/CODE] Thanks

Member Avatar for eeyc
0
838
Member Avatar for swapneelearth

If you are new to programming then I suggest you learn Visual Basic first. Its good for newbies and easy to learn. You can switch to C# later.

Member Avatar for ddanbe
0
127
Member Avatar for CMSHelper

XNA Game Studio - [url]http://creators.xna.com/en-US/[/url] I recommend XNA. I've been using it for about 2 weeks and I really like it. Its very easy to use and also fast. You can't only make games for PC but also Xbox 360 & Zune. :)

Member Avatar for farooqaaa
0
146
Member Avatar for Scuppery

Lol.... :D I love them! very funny! [QUOTE]20. I’m not anti-social; I’m just not user friendly [/QUOTE] My favorite one.....

Member Avatar for Lardmeister
7
526
Member Avatar for farooqaaa

By using Regex I've got links from an HTML Source. But now I want to save these links into a new array so that I can later use them. I mean, I want all the "m.Groups[]" in a new array. Here's my code: [CODE] String html = getSource(); r = …

Member Avatar for Ramy Mahrous
0
141
Member Avatar for darcee
Member Avatar for >shadow<
Member Avatar for TheBuzzer
Member Avatar for farooqaaa
0
103
Member Avatar for ZZucker

Are you stupid? _____ I am stupid. Put "Yes" or "No" in the above blank to answer :D.

Member Avatar for Lardmeister
0
1K
Member Avatar for The Dude

I am going to download it. I'll see it tomorrow. I've gotta get to bed now. P.S: I got dialup, thats why I am downloading it.

Member Avatar for Lardmeister
0
143
Member Avatar for The Dude
Member Avatar for FullBjarne
Member Avatar for Ancient Dragon

Hmm.. I know none of those users listed. Except Ancient Dragon, whose avatar is so ugly :D...

Member Avatar for peter_budo
0
217
Member Avatar for The Dude

Thats what I got... :) [img]http://img300.imageshack.us/img300/7842/captureyv5.jpg[/img]

Member Avatar for Epic Tissue
0
97

The End.