填空题
【程序说明】在窗体内设置一个弹出式菜单,分别对文本框进行“显示时间”、“显示日期”、“颜色”、“字体”和“清空”操作。m1为不可见菜单项,m11为其子菜单(共5项,均同名,索引值依次为0,1,2,3,4)。
Private Sub Form_Load 1
Timer1.Enabled = False '锁定定时器(时间间隔已设置为1秒)
End Sub
Private Sub m11_Click(Index As Integer)
Select Case Index
Case 0 : Timer1.Enabled = True
Case 1
Timer1.Enabled = ( ) : Text1.Text= "日期:" + ( )Case 2
CommonDialog1.Action = 3 : Text1.ForeColor =( )
Case 3
CommonDialog1.Flags = 256 '选择字体范围,否则出现运行错误
CommonDialog1.Action = 4 '打开“字体”对话框
Text1.FontBold = CommonDialog1.FontBold '用修改后的属性设置
Text1.FontItalic = CommonDialog1.FontItalic '文本框相应属性
Text1.FontName = CommonDialog1.FontName
Text1.FontSize = CommonDialog1.FontSize
Case 4: Text1.Text = ""
End Select
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _
x As Single, y As Single)
If Button = 2 Then( ), 2
End Sub
Private Sub Timer1_Timer 2
Text1.Text = "时间:" + Time$
End Sub