Welcome to the Forums
You need to stop your timer.
Just add
Code:
Timer1.enabled = False
inside that if statement.
Happy Coding
~Jawa
Help from me is always guaranteed!*
VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.
Private Declare Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Private Sub alertpay_Click()
Dim strLink As String
strLink = "http://www.alertpay.com"
Shell "c:\program files\internet explorer\iexplore " & strLink
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
If Command1.Enabled = True Then
Command1.Caption = "Sending info..."
End If
Command1.Enabled = False
Text1.Text = Text1.Text & " Sending your HWID to our sever. This is will take less than 1 min."
End Sub
Private Sub exit_Click()
Unload Me
End Sub
Private Sub form_load()
Dim Serial As Long, VName As String, FSName As String
'Create buffers
VName = String$(255, Chr$(0))
FSName = String$(255, Chr$(0))
'Get the volume information
GetVolumeInformation "C:\", VName, 255, Serial, 0, 0, FSName, 255
'Strip the extra chr$(0)'s
VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1)
FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1)
Text1.Text = "Your computer HWID is:" + Trim(Str$(Serial)) + " "
End Sub
Private Sub google_Click()
Dim strLink As String
strLink = "https://www.google.com/accounts/ServiceLogin?service=sierra&continue=https%3A%2F%2Fcheckout.google.com%2F%3Fupgrade%3Dtrue&hl=en&nui=1<mpl=default"
Shell "c:\program files\internet explorer\iexplore " & strLink
End Sub
Private Sub help_Click()
Dim strLink As String
strLink = "http://www.n-vision.org"
Shell "c:\program files\internet explorer\iexplore " & strLink
End Sub
Private Sub HWID_Click()
Dim strLink As String
strLink = "http://www.n-vision.org/forum/showthread.php?t=5"
Shell "c:\program files\internet explorer\iexplore " & strLink
End Sub
Private Sub info_Click()
Form2.Show
End Sub
Private Sub paypal_Click()
Dim strLink As String
strLink = "http://www.paypal.com"
Shell "c:\program files\internet explorer\iexplore " & strLink
End Sub
Private Sub Timer1_Timer()
If ProgressBar1.Value = 100 Then
ProgressBar1.Value = 100
Else
ProgressBar1.Value = Val(ProgressBar1.Value) + Val(10)
End If
Label4.Caption = ProgressBar1.Value
If ProgressBar1.Value = 10 Then
Command1.Caption = "Downloading..."
End If
If ProgressBar1.Value = 100 Then
Command1.Caption = "Done."
End If
End Sub
The only way to make the "Done!" to work is that if I put the code I said in the timer but it keeps looping :
"Done!"
"Done!"
"Done!"
"Done!"
"Done!"
"Done!"
Last edited by simon66; January 7th, 2009 at 04:42 PM.
....
Private Sub Command1_Click()
Timer1.Enabled = True
If Command1.Enabled = True Then
Command1.Caption = "Sending info..."
End If
Command1.Enabled = False
Text1.Text = Text1.Text & " Sending your HWID to our sever. This is will take less than 1 min."
End Sub
Private Sub exit_Click()
Unload Me
End Sub
...
Private Sub Timer1_Timer()
If ProgressBar1.Value >= 100 Then
ProgressBar1.Value = 100
Timer1.Enabled= falseCommand1.Caption = "Done."
Else
ProgressBar1.Value = Val(ProgressBar1.Value) + Val(10)
End If
Label4.Caption = ProgressBar1.Value
If ProgressBar1.Value = 10 Then
Command1.Caption = "Downloading..."
End If
End Sub
Do it this way
Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ? My latest articles : Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.