VB上机操作题综合 - 图文 下载本文

Form1 Caption Name Label1 Caption Label3 Caption Label5 Caption Text1 Text Text3 Text Command1 Caption Default Check1 Caption Check3 Caption Combo1 Text List1 List

菜单编辑器 Form26 标题(&P): 索引(&X): 快捷键(&S): “空白” “空白” 确定 True 复选(&C) 可见(&V) Ctrl+A 菜单列表

Label2 Caption Label4 Caption Label6 Caption Text2 Text Text4 Text Command2 Caption Cancel Check2 Caption Check4 Caption Combo2 Text

名称(&M):

帮助上下文 ID(&H): 协调位置(&O): “空白” 0 取消 True 有效(&E)

显示窗口列表(&W) 3 - Right

VB程序设计—《计算机采购》

出题人:柳崧轶

程序运行前:

36 / 44

程序运行后:

说明:设计如图所示程序界面,当“计算机”和“操作系统”未被选定时,他们所在框架中的其他控件不能使用,如果单击“采购清单”按钮,则在下面的标签中显示用户所选择的信息。

详细内容:

程序使用控件如下:

37 / 44

窗体(Form)1个,框架(Frame)2个,标签(Label)3个,单选框(OptionButton)2个,复选框(CheckBox)2个,组合框(ComboBox)1个,文本框(TextBox)1个,按钮(CommandButton)1个。

控件属性设置:

Form1 Caption Frame1 Caption Label1 Caption Font Label2 Caption Font Label3 Caption Font BorderStyle Option1 Caption Font Enabled Check1 Caption Font Combo1 List Font Text1 Text Font Command1 Caption Font 计算机采购 为空 品牌 四号,粗体 数量 四号,粗体 为空 四号,粗体 1-Fixed Single Windows XP 四号,粗体 False 计算机 四号,粗体 联想 戴尔 惠普 宏基 四号,粗体 为空 四号,粗体 采购清单 四号,粗体 Option2 Caption Font Enabled Check2 Caption Font Windows 7 四号,粗体 False 操作系统 四号,粗体 Frame2 Caption 为空 参考代码:

Private Sub Check1_Click() Combo1.Enabled = True Text1.Enabled = True End Sub

Private Sub Check2_Click()

38 / 44

Option1.Enabled = True Option2.Enabled = True End Sub

Private Sub Command1_Click() If Check1.Value = 1 Then

If Option1.Value = True Then

Label3.Caption = Combo1.Text & Text1.Text & \台\安装\操作系统\ ElseIf Option2.Value = True Then

Label3.Caption = Combo1.Text & Text1.Text & \台\安装\操作系统\End If End If End Sub

VB程序设计—《选项》

出题人:蔡国欣

程序运行界面:

说明:设计如图所示窗体界面。

详细内容:

程序使用控件如下:

39 / 44

窗体(Form)1个,框架(Frame)1个,标签(Label)2个,单选框(OptionButton)5个,按钮(CommandButton)1个。 控件属性设置:

Form1 Caption Name Frame1 Caption Label1 Caption Label2 Caption Option1 Caption Option2 Caption Option3 Caption Value Option4 Caption Option5 Caption Command1 Caption

选项 Form24 操作系统

您选中了一个 Pentium Pro 运行在 Windows 95 选择处理器和操作系统 486(&4) Pentium(&P) Pentium Pro(&E) True

Windows 95(&W) Windows NT(&N) 关闭(&C)

VB程序设计—《VB菜单》

出题人:胡智鹏

程序运行界面:

40 / 44