Question[Help]Using my settings

Posts 1–15 of 19 · Page 1 of 2
[Help]Using my settings
Here is an example.
So right now I have 5 listboxitems. And the listboxitems counter says "5 current Items". When the program updates there is now 2 extra listboxitems, now a total of 7. How do i make it say "2 new items updated"?

Need help on this code.
Code:
MsgBox (My.Settings.Currentlistboxitems - *somethinghere*)
Hm. Can they download the updated version? Like for e.g.
[php]If "Http://whereyourupdateis.comrfile" exists Then
MsgBox ("An Update is available. Download will start now.")
Process.Start "Http://whereyourdownloadis.comrfile.rar"
End If[/php]
That will download your update..
Quote Originally Posted by ppl2pass View Post
Here is an example.
So right now I have 5 listboxitems. And the listboxitems counter says "5 current Items". When the program updates there is now 2 extra listboxitems, now a total of 7. How do i make it say "2 new items updated"?

Need help on this code.
Code:
MsgBox (My.Settings.Currentlistboxitems - *somethinghere*)
If all you want it to say is "2 new items updated" then simply do:
Code:
MsgBox ("Two new items updated.", 1, "Updates")
I probably didn't understand the question right, but how is this being updated? Like, you should be able to link the amount of updates into a message box text.
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.
Quote Originally Posted by NextGen1 View Post
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.
Is there a way to use my settings?
>.O.... What... the heck.. was that...
BRB IMMA GET MY DICTIONARY OUT.
Hilarious, I notated everything
>.< 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??
He's a pro. I was going to suggest something like that. :P

Also- how do you remember the alphabet?

Years of practice and songs...
No. I'm just a child genius .
Yet i need to be an Adult Genius like NextGen to remember all that crap (don't mean it to be crap, just jibberish to me )
Read the notations ...
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?
Posts 1–15 of 19 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us