Lex, he wants to display the current amount of listboxes, and also how many new ones..
Now that I understand what he wants, best to learn in a example:
1. Add as many listboxes as you want to a blank form
2. Add a Button
3. Double Click Button
Add this code
[php]
' Declaring ListCount as a Integer = 0 (starting point)
Dim listcount As Integer = 0
' Check every control on the form
For Each contrl As Control In Me.Controls
' If the ctrl is a listbox
If contrl.[GetType]().ToString().ToUpper() = "SYSTEM.WINDOWS.FORMS.LISTBOX" Then
Dim lb As ListBox = DirectCast(contrl, ListBox)
'Count the listboxes
System.Math.Max(System.Threading.Interlocked.Incre ment(listcount), listcount - 1)
End If
Next
'Display the number of listboxes in a message box
MessageBox.Show(listcount.ToString())
[/php]
You can use the same concept with any control, and instead of using a message box, use anything you would like.
>.O.... What... the heck.. was that...
BRB IMMA GET MY DICTIONARY OUT.
>.< Yet i cannot seem to understand the new language "NG1"...
no its the code i don't understand..
how the *censored* do you remember all that??
Is there a way to use my.settings instead?
Uhm.. Not for updates.. you'd have to have a FTP host as well.
Whats the function to subtract two integers in vb.net?