福建VB设计题(修正版)_10278

上传人:飞*** 文档编号:44748378 上传时间:2018-06-14 格式:DOC 页数:14 大小:618.50KB
返回 下载 相关 举报
福建VB设计题(修正版)_10278_第1页
第1页 / 共14页
福建VB设计题(修正版)_10278_第2页
第2页 / 共14页
福建VB设计题(修正版)_10278_第3页
第3页 / 共14页
福建VB设计题(修正版)_10278_第4页
第4页 / 共14页
福建VB设计题(修正版)_10278_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《福建VB设计题(修正版)_10278》由会员分享,可在线阅读,更多相关《福建VB设计题(修正版)_10278(14页珍藏版)》请在金锄头文库上搜索。

1、1“2012.12.29VB 题库“里面有 VB 设计题目和编程题目,选择题目的答案.大家可 以在电脑操作.没有安装考试系统的直接打开考生文件夹使用.希望大家多多练 习 张晓梅老师(88008293) 2013/5/22 10:00:44 实验报告大家按以前的要求,在实验本子上写 3 个实验, 每个实验做一题设计和两题编程.题目就从“2012.12.29VB 题库“里面的选,每个 人可以不同 15 周上交 5630101:答:设置 Text1 的属性 MultiLine 为 true 和 ScrollBars command1 的属性 Enabled 为 FalsePrivate Sub Op

2、1_Click() Text1.FontBold = True End SubPrivate Sub Op2_Click()2Text1.FontBold = False End SubPrivate Sub Cd1_Click() P1.Cls P1.scale (0,0)-(1800,1200) P1.Line (0, 0)-(1800, 1200) End Sub Private Sub Cd2_Click() P1.Cls P1.Circle (900, 600), 500 End SubPrivate Sub Command1_Click() Dim n As Integer Dim

3、 a As Integer, b As Integer, c As Integer n = Text1.Text3a = n Mod 10 b = n 10 Mod 10 c = n 100 If a 3 + b 3 + c 3 = n ThenLabel1.Caption = “是水仙花数“ ElseLabel1.Caption = “不是水仙花数“ End If End SubDim A(1 To 10) Private Sub Command1_Click() Randomize Dim i As Integer For i = 1 To 10A(i) = Int(10 + Rnd *

4、(99 - 10 + 1)Text1.Text = Text1.Text & A(i) & “ “ Next i End SubPrivate Sub Command2_Click() Min = A(1) Max = A(1) For i = 2 To 10If A(i) Max ThenMax = A(i)End If Next i Text2.Text = Max4Text3.Text = Min End Sub5630102:答:设置 image1 的属性 BorderStyle 为 1 和 Stretch 为 true 在 image1 的 picture 属性找到图片Private

5、 Sub Command1_Click() Text2.Text = Text1.SelText Text1.Text = “ Text1.SetFocus End Sub5Private Sub Command1_Click() 不得删改本行注释 Dim a As Single a = Text1.Text If a = 80 And a = 60 And a 0 And a = “0“ And Mid(s, i, 1) 菜单编辑器, 标题和名称不能少,例如:标题: 文件,名称为 File. 注意名称的大小写和题目一致设置标签 L1 的 BorderStyle 属性为 1, Private

6、Sub Cd1_Click()L1.Visible = False End SubPrivate Sub Cd2_Click() L1.Visible = True End Sub 5630106:9设置 combo1 的 style 属性为 1,然后下拉组合框 Private Sub Cd1_Click() Combo1.AddItem Combo1.Text End SubPrivate Sub Cd2_Click() Combo1.RemoveItem Combo1.ListIndex End SubPrivate Sub Command1_Click() Dim n As Intege

7、r n = Text1.Text If (n Mod 4 = 0 And n Mod 100 0) Or n Mod 400 = 0 ThenText2.Text = “是闰年“ ElseText2.Text = “非闰年“ End If End Sub10Private Sub Command1_Click() 不得删改本行注释 Text2.Text = zh(Text1.Text) End Sub5630107:Option Explicit Private Sub Command1_Click() 不得删改本行注释 Dim S As String Open “K:administrato

8、r5630111PDZM.TXT“ For Input As #1Input #1, SText1.Text = SEnd SubPrivate Sub Command2_Click() 不得删改本行注释11Dim S As String, i As Integer, N As Integer S = Text1.Text For i = 1 To Len(S)If Mid(S, i, 1) = trim(Text2.Text) then n=n+1End If Next Text3.Text = N End Sub 5630108:Private Sub C1_Click() L1.AddI

9、tem T1.Text L2.AddItem Asc(T1.Text) T1.Text = “ T1.SetFocus End Sub 5630109:12Private Sub Form_Load() List1.AddItem “PictureBox“ List1.AddItem “Label“ List1.AddItem “TextBox“ List1.AddItem “Frame“ List1.AddItem “CommandButton“ List1.AddItem “CheckBox“ End SubPrivate Sub Command1_Click() Text1.Text =

10、 List1.Text Text2.Text = List1.ListIndex End Sub5630110:Private Sub Command1_Click() Dim n As Integer n = Text1.Text For i = 1 To nIf Sqr(i) = Int(Sqr(i) ThenText2.Text = Text2.Text & i & “ “End If Next i End Sub13Option Explicit Dim A(1 To 20) As Integer 不得删改本行声明Private Sub Command1_Click() Dim i a

11、s integer 不得删改本行注释 Open “K:administrator5630005input02.txt“ For Input As #1 For i = 1 To 20Input #1, A(i)Text1.Text = Text1.Text & A(i) & “ “ Next i End SubPrivate Sub Command2_Click() Dim i As Integer, sum As Integer For i = 1 To 20sum = sum + A(i) Next iText2.Text = sum End Sub14答:设置 image1 的属性 BorderStyle 为 1 和 Stretch 为 true Private Sub Check1_Click() If Check1.Value = 1 ThenImage1.Picture = LoadPicture(“K:Fjexam95Jztx.bmp“) ElseImage1.Picture = LoadPicture(“) End If End Sub

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号