赵国存半月板损伤主任:利用Timer控件、TextBox控件、CheckBox控件、OptionButton控件设计一个窗体

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/04 07:35:18
要求在窗体的标题栏中有当前时间显示,而且每隔10秒就把CheckBox控件及OptionButton控件的当前值显示在TextBox控件中.

在窗体上放好相应控件
Private Sub Form_Load()
Timer1.Interval = 1
Timer2.Interval = 10000

End Sub

Private Sub Timer1_Timer()
Form1.Caption = Time
End Sub

Private Sub Timer2_Timer()
Text1.Text = Option1.Value
Text2.Text = Check1.Value
End Sub