VB课后答案.docx
《VB课后答案.docx》由会员分享,可在线阅读,更多相关《VB课后答案.docx(79页珍藏版)》请在冰豆网上搜索。
![VB课后答案.docx](https://file1.bdocx.com/fileroot1/2023-1/27/99be880e-9da5-4d3b-8970-3bbe81a89fe7/99be880e-9da5-4d3b-8970-3bbe81a89fe71.gif)
VB课后答案
1,VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=3195
ClientLeft=60
ClientTop=345
ClientWidth=4680
LinkTopic="Form1"
ScaleHeight=3195
ScaleWidth=4680
StartUpPosition=3'窗口缺省
BeginVB.CommandButtonCommand1
Caption="Command1"
Height=375
Left=2640
TabIndex=0
Top=2400
Width=1575
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubCommand1_Click()
PrintSqr(8),8^(1/3)
EndSub
2,VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=3195
ClientLeft=60
ClientTop=345
ClientWidth=4680
LinkTopic="Form1"
ScaleHeight=3195
ScaleWidth=4680
StartUpPosition=3'窗口缺省
BeginVB.CommandButtonCommand1
Caption="Command1"
Height=495
Left=3720
TabIndex=0
Top=2640
Width=855
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubCommand1_Click()
Dimi%
Fori=100To110
Printi,i^(1/2)
Next
EndSub
3,VERSION5.00
BeginVB.FormForm1
AutoRedraw=-1'True
Caption="Form1"
ClientHeight=3195
ClientLeft=60
ClientTop=345
ClientWidth=4680
BeginPropertyFont
Name="楷体"
Size=21.75
Charset=134
Weight=400
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
ForeColor=&H000000FF&
LinkTopic="Form1"
ScaleHeight=3195
ScaleWidth=4680
StartUpPosition=3'窗口缺省
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubForm_Load()
Print:
Print
Print"郑州大学在前进!
"
EndSub
4,VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=3780
ClientLeft=60
ClientTop=345
ClientWidth=6285
LinkTopic="Form1"
ScaleHeight=3780
ScaleWidth=6285
StartUpPosition=3'窗口缺省
BeginVB.LabelLabel1
Caption="蓝天、白云、绿水、青山"
BeginPropertyFont
Name="宋体"
Size=21.75
Charset=134
Weight=400
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
ForeColor=&H00FF0000&
Height=975
Left=600
TabIndex=0
Top=1080
Width=4935
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
第二章
1,VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=3090
ClientLeft=60
ClientTop=450
ClientWidth=3615
BeginPropertyFont
Name="宋体"
Size=12
Charset=134
Weight=700
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
LinkTopic="Form1"
ScaleHeight=3090
ScaleWidth=3615
StartUpPosition=3'窗口缺省
BeginVB.CommandButtonCommand2
Caption="商"
Height=375
Left=1920
TabIndex=4
Top=1680
Width=975
End
BeginVB.CommandButtonCommand1
Caption="乘积"
Height=375
Left=600
TabIndex=3
Top=1680
Width=975
End
BeginVB.TextBoxText2
Height=375
Left=1920
TabIndex=2
Top=840
Width=1095
End
BeginVB.TextBoxText1
Height=375
Left=480
TabIndex=1
Top=840
Width=1095
End
BeginVB.LabelLabel3
BorderStyle=1'FixedSingle
Caption="Label3"
Height=375
Left=2040
TabIndex=6
Top=2400
Width=975
End
BeginVB.LabelLabel2
Caption="计算结果为:
"
Height=375
Left=480
TabIndex=5
Top=2400
Width=1575
End
BeginVB.LabelLabel1
AutoSize=-1'True
Caption="请输入两个数:
"
Height=240
Left=960
TabIndex=0
Top=360
Width=1785
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubCommand1_Click()
Label3=Val(Text1)*Val(Text2)
EndSub
PrivateSubCommand2_Click()
Label3=Val(Text1)/Val(Text2)
EndSub
2,VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=3090
ClientLeft=60
ClientTop=450
ClientWidth=5490
BeginPropertyFont
Name="宋体"
Size=12
Charset=134
Weight=700
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
LinkTopic="Form1"
ScaleHeight=3090
ScaleWidth=5490
StartUpPosition=3'窗口缺省
BeginVB.CommandButtonCommand3
Caption="隐藏"
Height=375
Left=4080
TabIndex=3
Top=2040
Width=975
End
BeginVB.CommandButtonCommand2
Caption="图片2"
Height=375
Left=4080
TabIndex=2
Top=1320
Width=975
End
BeginVB.CommandButtonCommand1
Caption="图片1"
Height=375
Left=4080
TabIndex=1
Top=600
Width=975
End
BeginVB.PictureBoxPicture1
AutoSize=-1'True
BeginPropertyFont
Name="宋体"
Size=9
Charset=134
Weight=400
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
Height=1935
Left=600
ScaleHeight=1875
ScaleWidth=2715
TabIndex=0
Top=480
Width=2775
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubCommand1_Click()
Picture1.Picture=LoadPicture("d:
\tu1.jpg")
EndSub
PrivateSubCommand2_Click()
Picture1.Picture=LoadPicture("d:
\tu2.jpg")
EndSub
PrivateSubCommand3_Click()
Picture1.Visible=False
EndSub
3,VERSION5.00
BeginVB.FormForm1
Caption="收款机"
ClientHeight=2730
ClientLeft=60
ClientTop=450
ClientWidth=4680
BeginPropertyFont
Name="宋体"
Size=12
Charset=134
Weight=700
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
LinkTopic="Form1"
ScaleHeight=2730
ScaleWidth=4680
StartUpPosition=3'窗口缺省
BeginVB.CommandButtonCommand1
Caption="总价为"
Height=375
Left=600
TabIndex=4
Top=1920
Width=1695
End
BeginVB.TextBoxText2
Height=495
Left=3000
TabIndex=3
Top=960
Width=1335
End
BeginVB.TextBoxText1
Height=495
Left=3000
TabIndex=2
Top=240
Width=1335
End
BeginVB.LabelLabel3
Alignment=2'Center
BorderStyle=1'FixedSingle
Height=495
Left=2760
TabIndex=5
Top=1920
Width=1455
End
BeginVB.LabelLabel2
Alignment=2'Center
Caption="货物的单价(元):
"
Height=375
Left=360
TabIndex=1
Top=1080
Width=2295
End
BeginVB.LabelLabel1
Alignment=2'Center
Caption="货物的数量(个):
"
Height=375
Left=360
TabIndex=0
Top=360
Width=2295
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubCommand1_Click()
Label3=Text1*Text2
EndSub
4,
VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=1890
ClientLeft=60
ClientTop=450
ClientWidth=4365
LinkTopic="Form1"
ScaleHeight=1890
ScaleWidth=4365
StartUpPosition=3'窗口缺省
BeginVB.CommandButtonCommand2
Caption="清除"
BeginPropertyFont
Name="宋体"
Size=12
Charset=134
Weight=700
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
Height=375
Left=2400
TabIndex=3
Top=1200
Width=975
End
BeginVB.CommandButtonCommand1
Caption="复制"
BeginPropertyFont
Name="宋体"
Size=12
Charset=134
Weight=700
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
Height=375
Left=720
TabIndex=2
Top=1200
Width=975
End
BeginVB.TextBoxText2
Height=495
Left=2160
TabIndex=1
Top=360
Width=1695
End
BeginVB.TextBoxText1
Height=495
Left=480
TabIndex=0
Top=360
Width=1455
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubCommand1_Click()
Text2=Text1
EndSub
PrivateSubCommand2_Click()
Text1=""
Text2=""
EndSub
PrivateSubForm_Load()
Command1.Visible=False
Command2.Visible=False
EndSub,
PrivateSubText1_Change()
Command1.Visible=True
Command2.Visible=True
EndSub
5,VERSION5.00
BeginVB.FormForm1
Caption="Form1"
ClientHeight=3300
ClientLeft=60
ClientTop=450
ClientWidth=4695
BeginPropertyFont
Name="宋体"
Size=12
Charset=134
Weight=700
Underline=0'False
Italic=0'False
Strikethrough=0'False
EndProperty
LinkTopic="Form1"
ScaleHeight=3300
ScaleWidth=4695
StartUpPosition=3'窗口缺省
BeginVB.TimerTimer1
Enabled=0'False
Interval=500
Left=3120
Top=1320
End
BeginVB.CommandButtonCommand2
Caption="停止"
Height=495
Left=2640
TabIndex=1
Top=2400
Width=975
End
BeginVB.CommandButtonCommand1
Caption="移动"
Height=495
Left=840
TabIndex=0
Top=2400
Width=1095
End
BeginVB.ImageImage1
Height=1800
Left=840
Top=360
Width=1500
End
End
AttributeVB_Name="Form1"
AttributeVB_GlobalNameSpace=False
AttributeVB_Creatable=False
AttributeVB_PredeclaredId=True
AttributeVB_Exposed=False
PrivateSubForm_Load()
Image1.Picture=LoadPicture("d:
\tu3.jpg")
EndSub
PrivateSubCommand1_Click()
Timer1.Enabled=True
EndSub
PrivateSubCommand2_Click()
Timer1.Enabled=False
EndSub
PrivateSubTimer1_Timer()
Image1.Left=Int(Rnd*(Form1.ScaleWidth-Image1.Width))
Image1.Top=Int(Rnd*(Form1.ScaleHeight-Image1.Height)