男人手表什么颜色好看:vb框架用法(运行有问题)

来源:百度文库 编辑:神马品牌网 时间:2024/05/08 14:51:00
Private Sub Command1_Click()
If Option1 Then
Text1.FontName = "魏碑"
Else
Text1.FontName = "幼圆"
End If
If Option3 Then
Text1.FontSize = "16"
Else
Text1.FontSize = "24"
End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Form1.Caption = "框架用法示列"
Command1.Caption = "确定"
Command2.Caption = "结束"
Frame1.Caption = "字体类型"
Frame2.Caption = "字体大小"
Option1.Caption = "魏碑"
Option2.Caption = "幼圆"
Option3.Caption = "16"
Option4.Caption = "24"
Text1.Text = "visual basic 程序设计"
End Sub

确保你的系统中有你在程序中所使用的字体,否则运行时会出错

Text1.FontSize = "16"
Text1.FontSize = "24"
应该把上边语句中引号去掉,否则直接输出,并不是字号!!