標題:

Visual Studio 2005 小時鐘程式

發問:長頸鹿美語 english online

我們需要一個關於"Visual Studio 2005" 的小時鐘程式 關於功能 回答者可以自行設計 然後請麻煩寫一下功能是什麼 他的作用是什麼 以及請貼上介面圖跟程式碼 謝謝

最佳解答:

這個是時鐘+鬧鐘 介面圖: Form1: 圖片參考:http://imgcld.yimg.com/8/n/AE04218954/o/150912230133613872053890.jpg Form2: 圖片參考:http://imgcld.yimg.com/8/n/AE04218954/o/150912230133613872053891.jpg Form3: 圖片參考:http://imgcld.yimg.com/8/n/AE04218954/o/150912230133613872053902.jpg 程式碼: Form1: Public Class Form1 Dim es As Long Public a As String Public b As String Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = Now.ToString("HH:mm:ss") & " " & Format(Now.Millisecond, "000") a = Now.ToString("HH:mm:ss") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click es += 1 Label2.Text = Label1.Text & "(" & es & ")" End Sub Private Sub Button2_Click(ByVal sender As System.Object,live abc互動英語 ByVal e As System.EventArgs) Handles Button2.Click Form2.Show() Me.Hide() End Sub Private Sub Button3_Click(By猛狗社鼠翻譯Val sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick If b = a Then Form3.Show() Timer2.Enabled = True End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep) End Sub End Class Form2: Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Form1.b = TextBox1.Text Me.Hide() Form1.Show() Form1.Timer3.Enabled = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Text = "00:00:00" Me.Hide() Form1.Show() End Sub End Class Form3: Public Class Form3 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Form1.Timer2.Enabled = False Form1.Timer3.Enabled = False Me.Hide() End Sub End Class

其他解答:6BD45AA720B3A9F1
arrow
arrow

    李皓翰狸喪爾痛價 發表在 痞客邦 留言(0) 人氣()