VB第四次上机作业Word文件下载.docx
- 文档编号:7024759
- 上传时间:2023-05-07
- 格式:DOCX
- 页数:12
- 大小:293.74KB
VB第四次上机作业Word文件下载.docx
《VB第四次上机作业Word文件下载.docx》由会员分享,可在线阅读,更多相关《VB第四次上机作业Word文件下载.docx(12页珍藏版)》请在冰点文库上搜索。
Else
Text1.FontBold=False
EndIf
IfCheck1
(1).Value=1Then
Text1.FontUnderline=True
Text1.FontUnderline=False
IfCheck1
(2).Value=1Then
Text1.FontItalic=True
Text1.FontItalic=False
IfCheck1(3).Value=1Then
Text1.FontStrikethru=True
Text1.FontStrikethru=False
EndSub
PrivateSubCommand1_Click()
Option1(0).Value=0:
Option1
(1).Value=0
Option1
(2).Value=0:
Option1(3).Value=0
Option2(0).Value=0:
Option2
(1).Value=0
Option2
(2).Value=0:
Option2(3).Value=0
Check1(0).Value=0:
Check1
(1).Value=0
Check1
(2).Value=0:
Check1(3).Value=0
Text1.FontSize=8
Text1.ForeColor=vbBlack
Text1.Font="
仿宋"
PrivateSubCommand2_Click()
UnloadMe
PrivateSubForm_Load()
PrivateSubHScroll1_Change()
Text1.FontSize=HScroll1.Value
PrivateSubOption1_Click(IndexAsInteger)
SelectCaseIndex
Case0
黑体"
Case1
隶书"
Case2
楷体"
Case3
宋体"
EndSelect
PrivateSubOption2_Click(IndexAsInteger)
Text1.ForeColor=vbRed
Text1.ForeColor=vbGreen
Text1.ForeColor=vbBlue
运行界面:
第162页16题
OptionExplicit
DimxAsInteger
DimyAsInteger
Randomize
x=Rnd*100
y=Rnd*100
PrivateSubTimer1_Timer()
IfImage1.Left+Image1.Width>
Form1.WidthOrImage1.Left<
0OrImage1.Height+Image1.Top>
Form1.HeightOrImage1.Top<
0Then
Form1.WidthThen
x=-x
ElseIfImage1.Height+Image1.Top>
Form1.HeightThen
y=-y
Image1.MoveImage1.Left+x,Image1.Top+y
第181页第1题
PrivateSubmc_Click()
Text3.Text=Val(Text1.Text)*Val(Text2.Text)
PrivateSubmchu_Click()
Text3.Text=Val(Text1.Text)/Val(Text2.Text)
PrivateSubmj_Click()
Text3.Text=Val(Text1.Text)+Val(Text2.Text)
PrivateSubmjian_Click()
Text3.Text=Val(Text1.Text)-Val(Text2.Text)
PrivateSubmq_Click()
Text1.Text="
"
Text2.Text="
Text3.Text="
PrivateSubms_Click()
r=Val(InputBox("
请输入上限"
))
k=Val(InputBox("
请输入下限"
PrivateSubmsheng_Click()
Ifk=0Then
k=100
r=1
Text1.Text=Int(Rnd*(k-r)+r)
Text2.Text=Int(Rnd*(k-r)+r)
PrivateSubmt_Click()
PrivateSubText1_Change()
第234页第四题
PrivateTypestu
xhAsString*6
xmAsString*10
psAsSingle
ksAsSingle
EndType
PrivatewjAsString
Privatea(1To100)Asstu
PrivateiAsInteger
Privateb(1To30)AsSingle
wj=InputBox("
输入文件路径及名称:
"
输入提示"
)
i=i+1
a(i).xh=InputBox("
输入学号:
a(i).xm=InputBox("
输入姓名:
a(i).ps=InputBox("
输入平时成绩:
a(i).ks=InputBox("
输入考试成绩:
Open"
wj"
ForAppendAs#1
Print#1,a(i).ps;
a(i).ks
Close#1
DimjAsInteger
Forj=1Toi
Text1.Text=Text1.Text+vbCrLf+a(j).xh+"
"
+a(j).xm+"
+Str(a(j).ps)+"
+Str(a(j).ks)+"
Next
PrivateSubCommand3_Click()
b(j)=(a(j).ps+a(j).ks)/2
Text2.Text=Text2.Text+vbCrLf+a(j).xh+"
+Str(b(j))+"
PrivateSubCommand4_Click()
Print#1,a(j).xh;
a(j).xm;
b(j)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- VB 第四 上机 作业