(35)下列事件过程的功能是:建立一个名为Datal的随机文件,存放角度值及这些角度的正炫函数值和余弦函数值,角度为1,2,3…,90。请在空白处填入适当的内容,将程序补充完整 Pivate Type Ang K As Integer Sinx As Single Cosx As Single End Type Dim Ksc As Ang Private Sub Form_Click() Dim Y As Single Dim i As Integer Dim Ksc As Ang Open______________ Y=3.14159/180 For i=1 To 90 Ksc.K=i Ksc.Sin=Sin(i*Y) Ksc.Cosx=Cos(i*Y) Next i Close#1 End SubA."‥\Datal.txt"For Random As#1 Len=10 Put#1,i,KscB."‥\Datal.txt"For Random As#1 Len=10 Put#1,Y,KscC."‥\Datal.txt"For Random As#1 Put#1,i,KscD."‥\Datal.txt"For Random As#1 Put#1,Y,Ksc
第1题:
下列事件过程的功能是:建立一个名为Data1的随机文件,存放角度值及这些角度的正弦函数值和余弦函数值,角度为1,2,3,…,90。请在空白处填入适当的内容,将程序补充完整( )。
Private Type Ang
K As Integer
Sinx As Single
Cosx As Single
End Type
Dim Ksc As Ang
Private Sub Form_Click()
Dim Y As Single
Dim i As Integer
Dim Ksc As Ang
Open______
Y=3.14159/180
For i=1 To 90
Ksc.K=i
Ksc.Sinx=Sin(i*Y)
Ksc.Cosx=Cos(i*Y)
Next i
Close #2
End Sub
A...\Data1.txtFor Random As #1 Len=10 Put#1,i,Ksc
B...\Data1.txtFor Random As #1 Len=10 Put#1,Y,Ksc
C...\Data1.txtFor Random As #1 Put#1,i,Ksc
D...\Data1.txtFor Random As #1 Put#1,Y,Ksc
第2题:
下列事件过程的功能是:建立一个名为Datal的随机文件,存放角度值及这些角度的正弦函数值和余弦函数值,角度为1,2,3,…,90。请在空白处填入适当的内容,将程序补充完整。 Private Type Ang K As Integer Sinx As Single Cosx As Single End Type Dim Ksc As Ang Private Sub Form_Click() Dim Y As Single Dim i As Integer Dim
A...\Data1.txtFor Random As #1 Len=10 Put #1,i,Ksc
B...\Data1.txtFor Random As #1 Len=10 Put #1,Y,Ksc
C...\Data1.txtFor Random As #1 Put #1,i,Ksc
D...\Data1.txtFor Random As #1 Put #1,Y,Ksc
第3题:
在名为Form1的窗体上建立一个二级菜单,该菜单需要含有、“文件”、 “帮助”两个主菜单项,名称分别为vbFile和vbHelp。其中,“文件”菜单包括“打开”、“关闭”、“退出”3个子菜单项,名称分别为vbOpen、vbClose、vbExit,如下图所示。
注意:
只建立菜单,不必定义其事件过程;文件必须存放在考生文件夹中,窗体文件名为 execisel.frm,工程文件名为execise1.vbp。
第4题:
在名为Form1的窗体中建立一个命令按钮,名为Cmd1,标题为Show(如下图所示)。编写适当的事件过程,使程序运行后,若单击Show按钮,则执行语句Form1.Print"Show"如果单击窗体,则执行语句Form1.Cls。
注意:
文件必须存放在考生文件夹中, 窗体文件名为execise351frm,工程文件名为 execise35.vbp。
第5题:
在名为Form1的窗体上,绘制一个名为Text1的文本框。设置文本框属性,在文本框中显示“文本框”;再建立一个名为Cmd1,标题为Clear的命令按钮,如下图所示。编写适当的事件过程,使程序运行后,若单击Clear命令按钮,则清除文本框中所显示的信息。
注意:
文件必须存放在考生文件夹中,窗体文件名为execise5.frm,工程文件名为exeeise5.vbp。