更多"在窗体上画一个命令按钮,然后编写如下代码: Private Type"的相关试题:
[单项选择]在窗体上画一个命令按钮,然后编写如下代码:
Private Type Record
ID As Integer
Name As String *20
End Type
Private Sub Command1_Click( )
Dim Maxsize, NextChar, MyChar
Open "d:/temp/female.txt" For Input As #1
Maxsize = LOF(1)
For NextChar = Maxsize To 1 Step -1
Seek #1, NextChar
MyChar = Input(1, #1)
Next NextChar
Print EOF(I)
Close 31
End Sub
程序运行后,单击命令按钮,其输出的结果为
A. True
B. False
C. 0
D. Null
[单项选择]在窗体上画一个命令按钮,然后编写如下代码:
Private Type Record
ID As Integer
Name As String * 20
End Type
Private Sub Command1_Click( )
Dim MaxSize,NextChar,MyChar
Open"D:/temp/female.txt"For Input As # 1
Max Size=LOF(1)
For Next Char=1 To MaxSize
Seek # 1,NextChar
MyChar=Input(1,# 1)
Next NextChar
Print EOF(1)
Close # 1
End Sub
程序运行后,单击命令按钮,其输出结果为 ______。
A. True
B. False
C. 0
D. Null
[单项选择]在窗体上画一个命令按钮,然后编写如下代码:
Private Type Record
ID As Integer
Name As String*20
End Type
Private Sub Command1_Click( )
Dim MaxSize.NextChar,MyChar
Open"D:/temp/female.txt"For Input As #1
MaxSize=LOF(1)
For NextChar=1 To MaxSize
Seek#1,NextChar
MyChar=Input(1,#1)
Next NextChar
Print EOF(1)
Close #1
End Sub
程序运行后,单击命令按钮,其输出结果为 ______。
A. True
B. False
C. 0
D. Null
[单项选择]窗体上画一个命令按钮,然后编写如下代码:Private Type Record ID As Integer Name As String * 20End TypePrivate Sub command1 _ Click( Open "c: /file. txt" for Input As MaxSize = LOF (1) for NextChar =MaxSize To Step-1 Seek #1, NextChar MyChar=Input(1,#1) Next NextChar Print EOF(1) Close #1 End Sub程序运行后,单击命令按钮,其输出结果为______。
A. True
B. False
C. 0
D. Null
[单项选择]在窗体上画一个命令按钮,然后编写如下代码:
Private Type Record
ID As Integer
Name As String * 20
End Type
Private Sub Command1_Click( )
Dim MaxSize, NextChar, MyChar
Open “d:/temp/female. txt” For Input As #1
MaxSize = LOF(1)
For NextChar = MaxSize To 1 Step -1
Seek #1, NextChar
MyChar = Input(1, # 1)
Next NextChar
Print EOF(1)
Close #1
End Sub
程序运行后,单击命令按钮,其输出结果为______。
A. True
B. False
C. 0
D. Null
[单项选择]在窗体上画一个命令按钮,名称为Command1。单击命令按钮时,执行如下事件过程:
Private Sub Command1_Click( )
a$="software and hardware"
b$=Right(a$,8)
c$=Mid(a$,1,8)
MsgBox a$,,b$,c$,1
End Sub
则在弹出的信息框的标题栏中显示的信息是( )。
A. software and hardware
B. software
C. hardware
D. 1
[单项选择]在窗体上画一个命令按钮,名称为Comraandl。单击该命令按钮时,执行如下事件过程:
Private Sub Command1_Click( )
a$="software and hardware"
b$=Right(a$, 8)
c$=Mid(a$, 1, 8)+b$
MsgSox a$, 1, b$
End Sub
则在弹出的消息框的标题栏中显示的信息是______。
A. software and hardware
B. software
C. hardware
D. 1
[单项选择]在窗体上画一个命令按钮Command1,然后编写下列代码:
Private Sub Command1_Click( )
Dim Arr1(10) As Integer,Art2(10) As Integer
n=3
For i=1 To 5
Arr1(i)=i
Arr2(n)=2*n+i
Next i
Print Arr2(n);Arr1(n)
End Sub
运行程序后,单击命令按钮,输出结果是( )。
A. 11 3
B. 3 11
C. 13 3
D. 3 13
[填空题]在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Commandl Click( )
Do Until b<0
a=InputBox("输入a的值")
a=Val(a)
b=InputBox("输入b的值")
b=Val(b)
a=a +b
Loop
Print a
End Sub
程序运行后,依次输入5,4,3,2,1,0,-1,-2,则输出结果是 【14】 。
[填空题]在窗体上画一个命令按钮Command1,然后编写如下程序:
Private Sub Command1_Click( )
Dim arr( )As Integer
ReDim arr(3)
For i=0 To 3
art(i)=i
Next i
x=InputBox("请输入一个数字:")
If Val(x)>4 Then
ReDim arr(4)
arr(4)=x
End If
Me.Print(arr(4)-arr(3))
End Sub
程序运行后,单击命令按钮,在输入对话框中输入12,输出结果为 【10】 。
[填空题]在窗体上画一个命令按钮Command1,然后编写如下程序:
Private Sub Command1_Cliek( )
Dim arr( )As Integer
Re Dim arr(3)
For i=0 To 3
arr(i)=i
Next i
x=InputBox("请输入一个数字:")
IfVal(x)>4 Then
Rc Dim arr(4)
arr(4)=x
End If
Me.Print(arr(4)-arr(3))
End Sub
程序运行后,单击命令按钮,在输入对话框中输入12,输出结果为 【10】 。