编一程序。程序运行时,单击窗体,窗体显示文字:“我可以用Visual Basic语言编写程序了!”?
求过程,谢谢 展开
Option Explicit
Private Sub Command1_Click()
Label2.Caption = "Hello"
Command1.Enabled = False
Command2.Enabled = True
Me.Caption = "单击“隐藏”按钮隐藏文字"
End Sub
Private Sub Command2_Click()
Label2.Caption = ""
Command1.Enabled = True
Command2.Enabled = False
Me.Caption = "单击“显示”按钮显示文字"
End Sub
Private Sub Form_Click()
Label1.FontName = "新宋体"
Label1.FontSize = 15
Label1.ForeColor = RGB(255, 0, 0)
Label1.Caption = "Visual Basic 程序设计"
Me.Caption = "VB程序1"
End Sub
Private Sub Form_Load()
Label1.Caption = ""
Label2.Caption = ""
Command2.Enabled = False
Me.Caption = "单击“显示”按钮显示文字"
End Sub