第一篇:vb大题上机总结
真・vb大题・正式版1.0
**********************************************************************
在考生文件夹下有一个工程文件sj44.vbp(相应的窗体文件名为sj44.frm),其功能是通过调用过程Sort将数组按降序排序,请装入该文件。程序
运行后,在四个文本框中各输入一个整数(如图1所示),然后单击命令
按钮,即可使数组按降序排序,并在文本框中显示出来(如图2所示)。
这个程序不完整,请把它补充完整,并能正确运行。
要求:
去掉程序中的注释符,把程序中的?改为正确的内容,使其实现上述功
能,但不能修改程序中的其他部分。最后把修改后的文件按原文件名存
盘。
图1
图2 本题的考查的是数组的应用,通过调用过程Sort将数组按降序排序,Ubound()函数是用来获得数组的上界,Lbound()函数是获得数组的下界,打开工程文件sjt4.vbp和相应的窗体文件名为sjt3.frm,在代码窗口中补充如下代码:
Private Sub Sort(a()As Integer)Dim Start As Integer, Finish As Integer Dim i As Integer, j As Integer, t As Integer Start = LBound(a)Finish = UBound(a)For i = Finish To 2 Step-1 For j = 1 To Finishlowerbound+1)* Rnd + lowerbound)这里,upperbound是随机整数范围的上限,而lowerbound则是随机整数范围的下限。修改后的主要代码如下:
Private Sub Command1_Click()Text1.Text = “": Text2.Text = ”“ For i = 1 To 10 a(i)= Fix(Rnd * 99 + 1)For j = 1 To i1 Exit For End If(避免取相同的值)
Next j Next i For i = 1 To 10 Text1.Text = Text1.Text + Str(a(i))+ Space(2)(隔两个空格输出下一个)Next i End Sub
Private Sub Command2_Click()Dim num As Integer, i As Integer num = InputBox(”请输入待查找的数“)For i = 1 To 10 If a(i)= num Then
盗版必究,版权所有。------vb作战小队
Text2.Text = Str(num)+ ”是数组中的第“ + Str(i)+ ”个值“ Exit For End If Next i If i > 10 Then Text2.Text = Str(num)+ ”不存在于数组中“ End If End Sub 按要求保存文件即完成本题。】
在名称为Form1的窗体上有三个Label控件和两个名称分别为COMSTART、COMEXIT,标题分别为”开始“、”退出“的命令按钮。编写函数ITEM(A,N)其功能是由数字A组成的不多于N位数的整数,并利用该函数求8+88+888+8888的和,结果写入考生文件夹下的wy36.dat文件中。执行完毕”开始“按钮变成”完成“,且无效(变灰)。
【语法
[Public | Private | Friend] [Static] Function name [(arglist)] [As type] [Statements] [name = expression] [Exit Function] [statements] [name = expression] End Function声明Function过程的名称,参数以及构成其主体的代码。】
在名称为Form1的窗体上有五个Label控件和两个命令按钮,数据文件stud1.dat,存放考生的考号、姓名、成绩。1)自定义一个数据类型stu,字符型数据定长为10。
2)按”开始“按钮后,能从考生文件夹下的stud1.dat 中读出所有数据并写入考生文件夹下的stud.dat文件中; 3)执行完毕,”开始“按钮变成”完成“,且无效(变灰);
第6 题.在名称为Form1的窗体上画二个文本框,名称分别为T1、T2,初始情况下都没有内容。请编写适当的事件过程,使得在运行时,在T1中输入的任何字符,立即显示在T2中(如图所示)。程序中不得使用任何变量。*注意:
存盘时必须存放在考生文件夹下,工程文件名为sjt5.vbp,窗体文件名为sjt5.frm。
Private Sub T1_Change()T2.Text = T1.Text End Sub 按要求保存文件即完成本题。
真・vb大题・正式版1.0
第30题在名称为Form1的窗体上用名称为shape1的形状控件画一个长、宽都为1200 的正方形。请设置适当的属性满足以下要求:
1)窗体的标题为”正方形“,窗体的最小化按钮不可用;
2)正方形的边框为虚线(线型不限)。运行后的窗体如图所示。
注意:
存盘时必须存放在考生文件夹下,工程文件名为sj116.vbp,窗体文件名
为sj116.frm。
【本题主要考查了形状控件的Width、Height和BorderStyle属性,同时考查了窗体的Caption和MinButton属性。Width:设置对象的宽度。Height:设置对象的高。BackStyle:设置边框类型。Caption:设置标题。
MinButton:设置窗体最小化按钮是否可用。本题各控件属性设置如下: 控件名 属性 属性值 Shape1 Width 1200 Shape1 Height 1200 Shape1 BackStyle 2-Dash Form1 Caption 正方形 Form1 MinButton False】
第9题.在考生文件夹下有一个工程文件sj83.vbp,相应的窗体文件为sj83.frm。在窗体上有一个命令按钮,其名称为Command1,标题为”计算并输出“。程序运行后,如果单击命令按钮,程序将计算500以内两个数之间(包括开头和结尾的数)所有连续数的和为1250的正整数,并在窗体上显示出来。这样的数有多组,程序输出每组开头和结尾的正整数,并用”~“连接起来,如图所示。该程序不完整,请把它补充完整。
Private Sub Command1_Click()Dim i As Integer, j As Integer, iSum As Integer Print ”连续和为1250的正整数是:“ For i = 1 To 500 iSum = 0 For j = i To 500 iSum = j + iSum If iSum >= 1250 Then Exit For Next If iSum = 1250 Then Print i;” ~ ";j End If Next End Sub
第二篇:vb上机心得体会
心得体会:
刚开始学习vb的时候,我就觉得大一的计算机基础根本不值一提,难度相去甚远。我问过很多以前的同学,他们都说vb是编程语言中最简单的,但是在这次上机实习过程中,我发现要完成学生成绩管理系统实在有很大难度。平时看课本的时候,觉得还能够理解,看得懂,然而“纸上得来终觉浅”,一旦自己调试程序,总会犯很多错误,如前面说的“文件未找到”“下标越界”等等,都是平时没有机会解决和一些曾经被自己忽视的问题。有时候,为了找到代码中错误或不符合要求的地方,我不得不一遍又一遍地仔细检查程序,甚至标点符号都不能放过。细节决定成败,一个小小的分号也会起着扭转乾坤的作用。
在实习之前,我妄想从网站上下载一个或者请论坛上的好友帮忙,后来我发现这条路走不通,他们从来都不给别人提供实质性的帮助,只是象征性地说:“不会问老师。”于是我打消了这个念头,开始自己动手做。
当我无数次调试总算读出文件的时候,那种高兴劲可想而知。我慢慢觉得,其实自己调试程序蛮有意思的。既弥补了在vb学习中的漏洞,还学到了新内容,积累了一定的实战经验,对以后的期末考试和等级考试起到了相当大的促进作用。
实习过程中,多亏指导老师帮助我找出错误的地方。如果不是他们的细心讲解,我很难完成这次实习任务。当然,我在编程方面还有很大不足,今后我定会加倍努力,为等级考试的顺利通过打下牢固的基础。
第三篇:个人vb上机考试总结
1.Option Base 1
‘下标从1开始 Dim a(100)As Integer
‘全局变量 Private Sub Command1_Click()Open “in.txt” For Input As 1
‘读入1号文件
For i = 1 To 100
Input #1, a(i)
‘100个数一次读入
Next i Close 1 End Sub
Private Sub Command2_Click()Dim s As Integer s = 0 For i = 1 To 100
If a(i)>= 400 And a(i)< 800 Then
s = s + a(i)
‘400到800之间的数字相加
End If Next i Text1 = s putdata s
‘将结果存入考生文件夹中 End Sub 2.这个题很简单,回顾一下知识
Private Function fun(x As Integer)As Long Dim sum As Long sum = 1 For i = 1 To x
sum = sum * i Next i fun = sum End Function Private Sub Command1_Click()Dim a As Integer Dim s As Long a = InputBox(“请输入”)s = fun(a)Text1 = s putdata “out.txt”, Text1 End Sub 3.调用标准模块中isprime函数判断是否为素数,求100-200间素数的和 Private Sub Command1_Click()Dim i As Integer Dim s As Integer For i = 100 To 200
‘从100 到200 If isprime(i)= True Then
‘如果为素数则相加
s = s + i End If Next i Text1 = s putdata “out.txt”, Text1
‘查看代码确定变量个数End Sub 打开标准模块的方法
工程资源管理器----form1----右击----添加----添加模块 4.8+88+888+8888 Private Sub Form_Click()Dim a As Integer, n As Integer, j As Integer, sum As Single a = 8 n = 4 For j = 1 To 4
sum = sum + Item(a, n)Next j Print “sum:”;sum End Sub Function item(a, k)Dim p As String, q As String, s As Single Dim k As Integer, i As Single p = “" For i = 1 To k
q$ = Str(k)
p$ = p$ + q$ Next i s = Val(p$)item = s End Function
Private Sub Form_Click()Dim a As Integer, n As Integer, j As Integer, sum As Single a = 8 n = 4 For j = n To 1 Step-1
If j = n Then
sum = item(a, j)
Else
sum = sumhscroll.Value
‘用滚动条控制速度 End Sub Private Sub Timer1_Timer()Static i As Integer If i = 0 Then Picture1.Picture = LoadPicture(”2.ico“)
‘随时间变化,图片变化
i = 1 Else Picture1.Picture = LoadPicture(”1.ico“)i = 0 End If End Sub 6.-2.-,73,82,-76,-1,24,321,-25,89,-20 打印其中的每个负数及计算并输出正数及负数的和 Private Sub Form_Click()Dim num As Integer negativesum = 0: positivesum = 0 For i = 1 To 10 num = InputBox(”enter data:“)
‘从键盘中输入10个数
If num < 0 Then
Print num
negativesum = negativesum + num Else
positivesum = positivesum + num
End If Next i Print Print ”negativesum=“;negativesum Print ”positivesum=“;positivesum End Sub 7.a aa aaa aaaa bbbb bbb bb b
Private Sub Command1_Click()Dim a(4)As String, b(4)As String Dim k As Integer, l As Integer myfile = App.Path & ”“ & ”picture.dat“ Open myfile For Output As #1 For k = 1 To 4
a(k)= String(2 * k1, ”b“)Next k For k = 1 To 4
Print #1, a(k)Next k
‘若为负数则输出再计算其和
‘计算正数和 string函数
‘ For k = 4 To 1 Step-1
‘步长一定要写
Print #1, b(k)Next k Close #1 End Sub 8.单击command1将list1中全部选中 单机command2 全部写入“output.txt”中(multiselect=1)Private Sub Command1_Click()Dim i As Integer For i = 0 To List1.ListCount – 1
‘从下表为0的列表到最后一个选中都变为真
List1.Selected = True Next i End Sub
Private Sub Command2_Click()Dim i As Integer Open ”out7.txt“ For Output As #1
‘先打开文件再逐个写入文件中 For i = 0 To List1.ListCount500
Image1.Width = Image1.Width-500 End If End Sub 11.Private Sub Command1_Click()Text1 = InputBox(”请输入要添加的项目“)
‘从键盘输入到文本框再添加到列表框中 List1.AddItem Text1 End Sub
Private Sub Command2_Click()Text1 = InputBox(”请输入要删除的项目“)For i = 0 To List1.ListCount – 1
‘从第一个到最后一个只要与text1中相同则删除
If List1.List(i)= Text1.Text Then
List1.RemoveItem i
End If Next i End Sub 12 Private Sub Command1_Click()Dim chr As String, number As Integer, cp As Integer, lp As Integer Dim others myfile1 = App.Path & ”“ & ”prog8a.dat“
‘路径
myfile2 = App.Path & ”“ & ”prog8b.dat“ Open myfile1 For Input As #1
打开已有文件myfile1,创建myfile2分别作一号和二号文件 Open myfile2 For Output As #2
While Not Eof(1)
Input #1, chr
If Asc(chr)>= 48 And Asc(chr)<= 57 Then
number = number + 1
‘用asc码来识别性质
ElseIf Asc(chr)>= 65 And Asc(chr)<= 90 Then
cp = cp + 1
ElseIf Asc(chr)>= 97 And Asc(chr)<= 122 Then
lp = lp + 1
Else
others = others + 1
End If Wend Print #2, number, cp, lp.others
Close Command1.Caption = ”完成" Command1.Enabled = False End Sub
‘把得到的结果分别写入到二号文件中
第四篇:VB上机试题及答案
上机操作练习题
1.某数组有20个元素,其值为随机产生的两位整数。现要求将前10个元素与后10个元素对换。即第1个元素与第20个元素互换,第2个数与第19个元素互换,…,第10个元素与第11个元素互换。在窗体上输出数组原来各元素的值与对换后各元素的值。
Option explicit Dim a(1 to 20)as integer, I as integer, j as integer, t as integer Private Sub Form_Load()Show Print “原始数组是:” Randomize For i = 1 To 20
a(i)= Int(Rnd * 90)+ 10
Print a(i);If i Mod 10 = 0 Then Print Next i Print Print “现在数组是:” For i = 1 To 10
j = 211
a(k)= a(k + 1)
Next k
ReDim Preserve a(UBound(a)1 End If i = i + 1 Loop While(i <= UBound(a))If flag = False Then MsgBox n & “不在该数组中” Else Print “删除” & n & “后的数组是:” For i = 0 To UBound(a)Print a(i);Next i End If End Sub 3.数组a中存放着升序排列的数据,使用array赋值,将inputbox输入的新数插入到数组中,插入后数组仍有序。
注意:要求利用动态数组,能够实现多次插入 Private Sub Form_Load()Show n = 8: ReDim a(n)a = Array(5, 15, 23, 52, 68, 88, 90, 99)n = n + 1: ReDim Preserve a(n)m = InputBox(“请输入要插入的数据:”)For i = 1 To n1)Next k a(k)= m For i = 1 To n
Print a(i);Next i Print End Sub 4.6个评委为4位歌手打分,分数介于1-100之间。去掉一个最高分,一个最低分,求出每位选手的最后得分。将4位歌手得分从高到低排列输出,同时输出该选手的编号。
如:
歌手3 95分 歌手 1 87分 歌手 4 80分 歌手 2 70分
/ 19
Option Base 1
Private Type geshou
xuhao As String
fenshu(6)As Integer
score As Integer
pingjun As Integer End Type Dim singer(1 To 4)As geshou Private Sub Command1_Click()For i = 1 To 4 For j = 1 To 6
singer(i).fenshu(j)= Int(Rnd * 100)
singer(i).xuhao = “歌手” & i Next Next Call paixu End Sub
Private Sub paixu()Dim p As geshou For i = 1 To 4
For j = 1 To 5
For k = j To 6
If singer(i).fenshu(j)> singer(i).fenshu(k)Then
t = singer(i).fenshu(j)
singer(i).fenshu(j)= singer(i).fenshu(k)
singer(i).fenshu(k)= t
End If
Next
Next Next For i = 1 To 4 For j = 2 To 5
singer(i).score = singer(i).score + singer(i).fenshu(j)Next singer(i).pingjun = singer(i).score / 4 Next
For i = 1 To 3 For j = i To 4
If singer(i).score < singer(j).score Then
p = singer(i): singer(i)= singer(j): singer(j)= p
End If Next
/ 19
Next For i = 1 To 4 Print singer(i).xuhao & “得分:” & singer(i).pingjun Next End Sub Private Sub Form_Load()End Sub 10个评委给10个选手打分 Private Sub Form_Load()Show n = UBound(b)For i = 1 To 10
For j = 1 To 10
a(i, j)= Val(InputBox(“请第” & j & “位评委给第” & i & “位选手打分:”))Next j Next i For i = 1 To 10
max = a(i, 1): sum = 0
min = a(i, 1): ave = 0
For j = 1 To 10
If a(i, j)> max Then max = a(i, j)
If a(i, j)< min Then min = a(i, j)
sum = sum + a(i, j)
Next j
ave =(summin)/(n1
For j = i + 1 To n
If b(i)< b(j)Then
t = b(i): b(i)= b(j): b(j)= t
End If
Next j Next i Print “选手的得分由高到低为:” For i = 1 To 10
Print b(i);Next i End Sub 5.编写函数求一元二次方程ax2+bx+c=0的解。
注意:要求考虑方程有两相等实根、两不等实根和两个虚根的情况。Dim a As Single, b As Single, c As Single Dim s As Single a = InputBox(“请输入a”)
/ 19
b = InputBox(“请输入b”)c = InputBox(“请输入c”)s = b ^ 2Sqr(s))/ 2 * a End If End Sub 6.任意输入一组字符,统计出大写字母多少个,小写字母多少个,数字多少个?要求用过程实现。
Call tongji(a, n, m, o)Print “数字:” & n & Chr(13)& “小写:” & m & Chr(13)& “大写:” & o End Sub Private Sub tongji(a As String, n As Integer, m As Integer, p As Integer)For i = 1 To Len(a)If Asc(Mid(a, i, 1))> 47 And Asc(Mid(a, i, 1))< 58 Then
n = n + 1 ElseIf Asc(Mid(a, i, 1))> 96 And Asc(Mid(a, i, 1))< 123 Then
m = m + 1 ElseIf Asc(Mid(a, i, 1))> 64 And Asc(Mid(a, i, 1))< 91 Then
p = p + 1 End If Next End Sub 7.随机产生一个5*5的矩阵,将主对角线和次对角线元素都置为1,并求出矩阵的四周元素之和,显示在列表框中。
Option Base 1 Private Sub Form_Load()Dim a(5, 5)As Integer Dim s As Integer For i = 1 To 5 For j = 1 To 5
If i = j Or i = 6Asc(Mid(s1, i, 1))+ 64)ElseIf Asc(Mid(s1, i, 1))< 123 And Asc(Mid(s1, i, 1))> 96 Then convert = convert & Chr(1235: g = e
For j = 1 To n
If j > i Then
a(i, j)= 0
Else
If i = j Then
a(i, j)= 1
Else
a(i, j)= a(i1, ji + 1);String(2 *(i1)/ 2 To 1 Step(-1)
c = c + 1
s = Chr(64 + ii + c + 1);String(2 *(j1)/ 2 Else
x = x / 2 End If i = i + 1 Loop
ReDim Preserve a(UBound(a))If y < 0 Then For i = 1 To UBound(a)convert = convert & a(i)Next convert = “-” & convert Else For i = 1 To UBound(a)
/ 19
convert = convert & a(i)Next End If
End Function Private Sub Command1_Click()Dim y As Integer Text1.Text = “" y = InputBox(”请输入十进制数字“)Text1.Text = convert(y)
End Sub
Private Sub Form_Load()
End Sub 14.输入一个整数N,产生N个随机数(范围1—10*N),然后采用任何2种算法实现由小到大的排序。将排序前后的数据显示出来。
Option Base 1 Private Sub Command1_Click()Dim a()As Integer, n As Integer n = InputBox(”请输入数列项数“)ReDim a(n)For i = 1 To n
a(i)= Int(Rnd * 10 * n + 1)
Print a(i);Next Print ReDim Preserve a(n)For i = 1 To n1 For j = 1 To n2)+ fact(n2 s = s1 + s2: t = s2: s2 = s: s1 = t Next End Function
Private Sub Command2_Click()n = InputBox(”请输入n“)Print s(n)End Sub 17.编写2个函数,分别采用递归法和递推法求斐波纳契数列的第n个月的兔子数,n使用inputbox输入,调用函数的结果在窗体上显示。Private Sub Command1_Click()List1.Clear Dim i As Integer For i = Val(Text1.Text)To Val(Text2.Text)If isprime(i)= True Then
List1.AddItem(i)
c = c + 1
If i Mod 10 = 9 Then
/ 19
List1.Selected(c1 If n Mod i = 0 Then
isprime = False
Exit For End If Next End Function 18 Dim sum As Long Private Sub Command1_Click()
Dim i As Integer, j As Integer, a(40)As Long
a(1)= 1
a(2)= 1
For i = 3 To 40
a(i)= a(i2)
Next i
sum = 0
For j = 1 To 40
sum = sum + a(j)
Next j End Sub
Private Sub Command2_Click()
Open ”out18.txt“ For Output As #1
Print #1, ”数列1,1,2,3,5,8…的前四十项的之和是:“
Print #1, sum
Close #1 End Sub 1.百钱买百鸡
Option Explicit
Private Sub Command1_Click()Dim a As Integer, b As Integer For a = 1 To 34
For b = 1 To 20
If 3 * a + 5 * b +(100b)/ 3 = 100 Then
/ 19
Print a;
Print b;
Print 100b
End If
Next b Next a End Sub 2.分钱作业
Private Sub Command1_Click()Dim a As Single,b as single,c as single a = Text1.Text b = Fix(a / 100)Print ”100元:“;Print b c = ab * 50
b = Fix(c / 20)Print ”20元:“;Print b c = c0.05 * b b = Fix((c + 0.005)/ 0.02)Print ”0.02元:“;Print b c = c1
If a(i)= a(j)Then
GoTo aaa
End If
Next j
Next i For i = 1 To 10
Print a(i);Next i Print End Sub
Private Sub Command2_Click()Dim i As Integer, j As Integer, t As Integer For i = 1 To 9
For j = 1 + i To 10
If a(i)> a(j)Then
t = a(j)
a(j)= a(i)
a(i)= t
End If
Next j Next i For i = 1 To 10
Print a(i);Next i Print
End Sub
Private Sub Command3_Click()Dim i As Integer, j As Integer, t As Integer For i = 1 To 9
For j = 1 To 10c)> 10 ^(-5)i =(a + b)/ 2
If i ^ 2c = 0 Then
Exit Do
Else
a = i
End If Loop MsgBox(i)End Sub 7.闰年
Option Explicit
Private Sub 计算_Click()Dim i As Integer i = InputBox(”请输入一个年份“)If i Mod 4 = 0 And i Mod 400 = 0 Then
If i Mod 100 <> 0 Then
MsgBox ”NOT“
Else
MsgBox ”YES“
End If Else
MsgBox ”NOT“ End If
End Sub 8.三角
Option Explicit Private Sub Command1_Click()
/ 19
Dim a As Single Dim b As Single Dim c As Single Dim p As Single Dim s As Single
a = Text1.Text b = Text2.Text c = Text3.Text
p =(a + b + c)/ 2
s = Sqr((pb)* p +(p1
If n Mod i = 0 Then
MsgBox ”NOT“
Exit For
End If Next i If i = n Then
MsgBox ”YES“ End If End Sub
Private Sub Command2_Click()
Dim a As Boolean, n As Double, i As Double a = False n = InputBox(”请输入一个数:“)For i = 2 To n-1
If n Mod i = 0 Then
a = True
Exit For
End If Next i If a = True Then
/ 19
MsgBox ”NOT“ Else
MsgBox ”YES“ End If End Sub
Private Sub Command3_Click()Dim n As Double, i As Double n = InputBox(”请输入一个数:“)i = 2 Do While i < n
If n Mod i = 0 Then
MsgBox ”NOT“
Exit Do
End If i = i + 1 Loop If i = n Then
MsgBox ”YES“ End If End Sub
Private Sub Command4_Click()Dim n As Double, i As Double, sushu As Boolean n = InputBox(”请输入一个数:“)i = 2 sushu = True Do While i < n And sushu = True
If n Mod i = 0 Then
sushu = False
End If i = i + 1 Loop If sushu = True Then
MsgBox ”YES“ Else
MsgBox ”NOT" End If End Sub
/ 19
第五篇:VB上机试题及答案
1、在工程中添加一个窗体form1,当用户单击窗体时,在窗体上显示九九乘法表程序。结果如下图所示(本题编程解决,20分)
参考答案:
Private Sub Form_Click()
Cls
For i = 1 To 9
For j = 1 To i
Print i * j;“ ”;
Next j
Next i End Sub
2、在工程中,添加一个窗体form2,在窗体上放置一个文本框text1(文本框中的文字为“改变字形”,居中显示)。三个复选框check1,check2和check3,如图设置属性。
要求:当用户单击“加粗”、“斜体”、“下划线”这三个复选框时(即当复选框被选中时)能将文本框的字形变为“粗体、斜体、加下划线”(本题编程完成,满分:30分)
参考答案:
Private Sub Check1_Click()
Text1.FontBold = Check1.Value End Sub
Private Sub Check2_Click()
Text1.FontItalic = Check2.Value End Sub
Private Sub Check3_Click()
Text1.FontUnderline = Check3.Value End Sub
3、在工程中添加一窗体form3,在窗体上按下图放置两个标签和一个文本框,一个列表框和一个命令按钮,各控件的名称属性取默认值。其他属性按下图进行设置。
要求:当用户在文本框输入他的籍贯后,单击“添加籍贯”按钮时,能够将籍贯添加到列表框中。双击列表框中的某一项时将该项删除.(本题:20分)
参考答案:
Private Sub Command1_Click()
List1.AddItem Text1.Text End Sub
Private Sub List1_DblClick()
List1.RemoveItem List1.ListIndex End Sub
4、在窗体form4中建立下图所示的菜单,各菜单项的名称如下:
文件:file,新建:NEW,-:kong1,打开:OPEN,关闭:CLOSE 编辑:EDIT,剪切:CUT,复制:COPY,粘贴:PASTE(本题不用编程,30分)
参考答案:略