📄 例3_1_4.frm
字号:
VERSION 5.00
Begin VB.Form FRM3_1_2
BackColor = &H00FFC0C0&
Caption = "窗体:设计实例"
ClientHeight = 5100
ClientLeft = 840
ClientTop = 1410
ClientWidth = 7515
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 5100
ScaleWidth = 7515
Begin VB.CommandButton Command5
Caption = "UnLoad Picture"
Height = 495
Left = 3720
TabIndex = 13
Top = 4200
Width = 2775
End
Begin VB.CommandButton Command4
Caption = "Load Picture"
Height = 495
Left = 840
Style = 1 'Graphical
TabIndex = 12
Top = 4200
Width = 2415
End
Begin VB.CommandButton Command3
Caption = "min"
Height = 495
Left = 5280
TabIndex = 11
Top = 3360
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "normal"
Height = 615
Left = 5280
TabIndex = 10
Top = 2400
Width = 1215
End
Begin VB.Frame Frame1
Height = 2295
Left = 3600
TabIndex = 6
Top = 1560
Width = 1335
Begin VB.OptionButton Option6
BackColor = &H00000000&
Caption = "black"
ForeColor = &H00FFFFFF&
Height = 855
Left = 0
TabIndex = 9
Top = 1440
Width = 1335
End
Begin VB.OptionButton Option5
BackColor = &H00FFFFFF&
Caption = "white"
Height = 735
Left = 0
TabIndex = 8
Top = 720
Width = 1335
End
Begin VB.OptionButton Option4
BackColor = &H00FF0000&
Caption = "Blue"
ForeColor = &H00FF00FF&
Height = 735
Left = 0
TabIndex = 7
Top = 0
Width = 1335
End
End
Begin VB.OptionButton Option3
BackColor = &H0000FF00&
Caption = "绿"
Height = 615
Left = 1440
TabIndex = 3
Top = 3240
Width = 735
End
Begin VB.OptionButton Option2
BackColor = &H0000FFFF&
Caption = "黄"
Height = 855
Left = 1440
TabIndex = 2
Top = 2400
Width = 735
End
Begin VB.OptionButton Option1
BackColor = &H000000FF&
Caption = "红"
Height = 855
Left = 1440
TabIndex = 1
Top = 1560
Width = 735
End
Begin VB.CommandButton Command1
Caption = "max"
Height = 495
Left = 5280
TabIndex = 0
Top = 1560
Width = 1212
End
Begin VB.Label Label3
BackColor = &H00C0FFFF&
BorderStyle = 1 'Fixed Single
Caption = "此例重点考察常见属性—用鼠标单击相应选项可看到实际结果"
Height = 855
Left = 840
TabIndex = 14
Top = 240
Width = 5655
End
Begin VB.Label Label2
BackColor = &H0080FF80&
BorderStyle = 1 'Fixed Single
Caption = "窗体的背景色"
Height = 2295
Left = 3000
TabIndex = 5
Top = 1560
Width = 495
End
Begin VB.Label Label1
BackColor = &H00FF80FF&
BorderStyle = 1 'Fixed Single
Caption = "窗体的前景色"
Height = 2295
Left = 840
TabIndex = 4
Top = 1560
Width = 495
End
End
Attribute VB_Name = "FRM3_1_2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Label3.Visible = False
FRM3_1_2.WindowState = 2
Cls
Print " 此时窗体最大化!"
End Sub
Private Sub Command2_Click()
Label3.Visible = False
FRM3_1_2.WindowState = 0
Cls
Print " 此时窗体正常化--与设计时相同!"
End Sub
Private Sub Command3_Click()
Label3.Visible = False
FRM3_1_2.WindowState = 1
End Sub
Private Sub Command4_Click()
Label3.Visible = False
FRM3_1_2.Picture = LoadPicture(App.Path + "\bw\安装程序.bmp")
FRM3_1_2.CurrentX = 800: CurrentY = 500
Print " 图片已装入!"
End Sub
Private Sub Command5_Click()
Label3.Visible = False
FRM3_1_2.Picture = LoadPicture("")
FRM3_1_2.CurrentX = 800: CurrentY = 500
Print " 你刚刚卸载图片!"
End Sub
Private Sub Option1_Click()
Label3.Visible = False
If Option1.Value = True Then FRM3_1_2.ForeColor = vbRed
Cls
Print "窗体的Caption属性值为:“窗体:设计实例”"
Print
Print "前景色即窗体上文字或图形的颜色"
End Sub
Private Sub Option2_Click()
Label3.Visible = False
If Option2.Value = True Then FRM3_1_2.ForeColor = vbYellow
Cls
Print "窗体的Caption属性值为:“窗体:设计实例”"
Print
Print "前景色即窗体上文字或图形的颜色"
End Sub
Private Sub Option3_Click()
Label3.Visible = False
If Option3.Value = True Then FRM3_1_2.ForeColor = vbGreen
Cls
Print "窗体的Caption属性值为:“窗体:设计实例”"
Print
Print "前景色即窗体上文字或图形的颜色"
End Sub
Private Sub Option4_Click()
Label3.Visible = False
If Option4.Value = True Then FRM3_1_2.BackColor = vbBlue
End Sub
Private Sub Option5_Click()
Label3.Visible = False
If Option5.Value = True Then FRM3_1_2.BackColor = vbWhite
End Sub
Private Sub Option6_Click()
Label3.Visible = False
If Option6.Value = True Then FRM3_1_2.BackColor = vbBlack
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -