Witaj gościu! Zaloguj się lub Zarejestruj aby móc korzystać ze wszystkich funkcjonalności jakie oferuje to forum! Rozpocznij zarabianie przez internet, poznaj korzysci pracy w domu! Rejestracja i korzystanie z forum jest całkowicie darmowe!
Polska społeczność o zarabianiu przez internet, pracy w domu i dodatkowej pracy online
Zobacz dzisiejsze dyskusje →
Cytat:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = ProgressBar1.Maximum Then
MsgBox("xx", 0, "xx")
End If
End Sub
End Class
progressbar przejdzie do końca i wtedy wyskakuje co chwile to z msgbox i robi mi spam na ekranie
dodałem w timerze timer1.Stop() to w ciągu sekundy dochodzi do końca i dalej spamuje msgboxami
_____________________
@edit
co w tym kodzie jest zle?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = ProgressBar1.Maximum Then
Timer1.Stop()
Else
MsgBox("sdsd", 0, "asda")
End If
End Sub
idzie progres bar w tym czasie spamuje msgboxami. Gdy progressbar przejdzie do końca przestaje boxami spamoawc
Trzymaj od razu cały kod programu, żeby nie trzeba było milion postów pisać
Kod:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = 100 Then
Timer1.Stop()
End If
If ProgressBar1.Value = ProgressBar1.Maximum Then
MessageBox.Show("xx", "yy")
End If
End Sub
End Class
(04-06-2013 20:33)JaviDesire napisał(a): Trzymaj od razu cały kod programu, żeby nie trzeba było milion postów pisać
Kod:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = 100 Then
Timer1.Stop()
End If
If ProgressBar1.Value = ProgressBar1.Maximum Then
MessageBox.Show("xx", "yy")
End If
End Sub
End Class