分类：电脑/网络-软件
问题：关于VB一道题目设计一个秒表模拟程序，按下“开始”按钮，屏幕显示 
  一个秒表模拟程序，按下“开始”按钮，屏幕显示当前时间；按下“结束”按钮，屏幕显示结束时间和持续时间；按下“退出”，结束程序。运行界面如下图所示。
回答：1.添加timer控件，invterval设为1000，enaed为false2.添加3个label控件，caption分别命名为：开始时间、结束时间和持续时间3.添加3个text控件，enabled都设置为false4.添加3个command控件，caption分别命名为：开始、结束（enabled为false）和退出代码如下：Dim a, b, c As IntegerPrivate Sub Command1_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""Timer1.Enabled = TrueText1.Text = Time()Command2.Enabled = TrueCommand1.Enabled = FalseEnd SubPrivate Sub Command2_Click()Timer1.Enabled = FalseText2.Text = Time()Command1.Enabled = TrueCommand2.Enabled = FalseEnd SubPrivate Sub Command3_Click()EndEnd SubPrivate Sub Form_Load()a = 0: b = 0: c = 0End SubPrivate Sub Timer1_Timer()a = a + 1If a >= 60 Thena = 0b = b + 1End IfIf b >= 60 Thenb = 0c = c + 1End IfIf c < 10 And b < 10 And a < 10 ThenText3.Text = "0" & c & ":0" & b & ":0" & aElseIf c < 10 And b < 10 ThenText3.Text = "0" & c & ":0" & b & ":" & aElseIf c < 10 ThenText3.Text = "0" & c & ":" & b & ":" & aElseText3.Text = c & ":" & b & ":" & aEnd IfEnd Sub