24h購物| | PChome| 登入
2008-04-17 09:34:21| 人氣105| 回應0 | 上一篇 | 下一篇

progressbar練習

推薦 0 收藏 0 轉貼0 訂閱站台

label4在(剩餘時間為:) 的後面
label6在(完成:)的後面





Dim secend As Integer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ProgressBar1.Value = 0
secend = Val(TextBox1.Text)
ProgressBar1.Step = 100 / secend
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ProgressBar1.Value = ProgressBar1.Value + 10
Label6.Text = ProgressBar1.Value.ToString & ”%”
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
ProgressBar1.Step = 20
ProgressBar1.PerformStep()
Label6.Text = ProgressBar1.Value.ToString & ”%”
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ProgressBar1.Value = 0
Label6.Text = ProgressBar1.Value.ToString & ”%”
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.PerformStep()
secend = secend - 1
If secend <= 0 Then
Timer1.Enabled = False
Exit Sub
End If
Label4.Text = secend.ToString & ”秒”
Label6.Text = ProgressBar1.Value.ToString & ”%”
End Sub

台長: ,,飛ㄦ*
人氣(105) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類 | 個人分類: 程式設計篇 |
此分類上一篇:datetimepicker 練習

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文