题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-22 17:09:04

[单项选择]在窗体上画1个命令按钮,名称为Command1,然后编写如下程序: Dim Flag As Boolean Private Sub Command1_Click( )   Dim intNum As Integer   intNum=InputBox("请输入:")   If Flag Then    Printf(intNum)   End If End Sub Function f(x As Integer)As Integer   If X<10 Then     Y=X   Else     Y=X+10   End If   f=Y End Function Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)   Flag=True End Sub 运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为( )。
A. 0
B. 5
C. 15
D. 无任何输出

更多"在窗体上画1个命令按钮,名称为Command1,然后编写如下程序: "的相关试题:

[单项选择]在窗体上画1个命令按钮,名称为Command1,然后编写如下程序:
Dim Flag As Boolean
Private Sub Command1_Click( )
Dim intNum As Integer
intNum=InputBox("请输入:")
If Flag Then
Print f(intNum)
End If
End Sub
Function f(X as Integer)As Integer
If X<10 Then
Y=X
Else
Y=X+10
End If
f=Y
End Function
Private Sub Form_MouseUp(Button As integer,Shift As Integer,X as Single,Y As Single)
Flag=True
End Sub
运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为( )。
A. 0
B. 5
C. 15
D. 无任何输出
[单项选择]在窗体上画一个命令按钮,名称为Command1,然后编写如下程序:
Dim Flag As Boolean
Private Sub Command1_Click( )
Dim intNum As Integer
intNum=InputBox("请输入:")
If Flag Then
Print f(intNum)
End If
End Sub
Function f(X As Integer) As Integer
If X<10 Then
Y=X
Else
Y=X+10
End If
f=Y
End Function
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Flag=True
End Sub
运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为
A. 0
B. 5
C. 15
D. 无任何输出
[单项选择]在窗体上画 1 个命令按钮,名称为 Command1,然后编写如下程序: Dim Flag As Boolean Private Sub Command1_Click( ) Dim intNum As Integer intNum=InputBox("请输入:") If Flag Then Print f(intNum) End If End Sub Function f(X as Integer)As Integer If X<10 Then Y=X Else Y=X+10 End If f=Y End Function Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X as Single,Y As Single) Flag=True End Sub 运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输 出结果为______。
A. 0
B. 5
C. 15
D. 无任何输出
[单项选择]

在窗体上画1个命令按钮,名称为Command1,然后编写如下程序:
Dim Flag As Boolean
Private Sub Command1_Click( )
Dim intNum As Integer
intNum=InputBox(“请输入:”)
If Flag Then
Print f(intNum)
End If
End Sub
Function f(X as Integer)As Integer
If X<10 Then
Y=X
Else
Y=X+10
End If
f=Y
End Function
Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X as Single,Y As Single) Flag=True
End Sub
运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为()。


A. 0
B. 5
C. 15
D. 无任何输出
[单项选择]在窗体上画一个名称为Commana1的命令按钮,然后编写如下程序:
Dim SW As Boolean
Function func(X As Integer)As Integer
If X<20 Then
Y=X
Else
Y=20+X
End If
func = Y
End Function
Private Sub Form MouseDown(Button As Integer,_
Shift As Integer,X As Single, Y As Single)
SW = False
End Sub
Private Sub Form_MouseUp( Button As Integer,_
Shift As Integer ,X As Single, Y As Single)
SW = True
End Sub
Private Sub Commandl_Click( )
Dim intNum As Integer
intNum = InputBox(" ")
If SW Then
Print func(intNum)
End If
End Sub
程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为
A. 输出0
B. 输出25
C. 输出45
D. 无任何输出
[单项选择]在窗体上画1个命令按钮和1个文本框,其名称为Command1和Text1,再编写如下程序:
Dim ss As String
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii)<>" "Then ss=ss+Chr(KeyAscii)
End Sub
Private Sub Command1_Click( )
Dim m As String,i As Integer
For i=Len(ss) To 1 Step-1
m=m+Mid(ss,i,1)
Next
Text1.Text=UCase(m)
End Sub
程序运行后,在文本框中输入“Number 100”,并单击命令按钮,则文本框中显示的就是( )
A. NUMBER 100
B. REBMUN
C. REBMUN 100
D. 001 REBMUN
[单项选择]在窗体上画一个名称为Coramandl的命令按钮,然后编写如下程序;
Dim SW As Boolean
Function func(X As Integer)As Integer
If X<20 Then
Y=X
Else
Y=20+X
End If
func=Y
End Function
Private Sub Form_MouseDown(Button As Integer,
Shift As Integer, X As Single, Y As Single)
Dim a As Boolean
SW=False
End Sub
Private Sub Form_MouseUp(Button As Integer,
Shift As Integer, X As Single, Y As Single)
SW=True
End Sub
Private Sub Command1_Click( )
Dim intNum As Integer
intNum=InputBox("")
If SW Then
Print flmc(intNum)
End If
End Sub
程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为
A. 输出0
B. 输出2
C. 输出45
D. 无任何输出
[单项选择]

在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序:
Dim SW As Boolean
Function func(X As Integer)As Integer
If X<20 Then
Y=X
Else
Y=20+X
End If
func=Y
End FunctiOn
Phvate Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) SW=False
End Sub
Phvate Sub Form_MouseUp(BuRon As Integer,Shin As Integer,X As Single,Y As Single)
SW=Tree
End Sub
Pdvate Sub Commandl-Click( )
Dim intNum As Integer
intNum=InputBox("")
If SW Then
Print func(intNum)
End If End Sub
程序运行后,单击命令按钮,将显示一个输入对话框,如果在输入对话框中输入25,则程序的执行结果为()。


A. 输出0
B. 输出25
C. 输出45
D. 无任何输出
[填空题]

在名称为Forml的窗体上画一个文本框,其名称为Text1,在属性窗口中把该文本框的
MultiLine属性设置为True,然后编写如下的事件过程:
Private Sub Form Click( )
Open"d:/test/smText1.txt"For Input As #1
Do While Not()
Line Input #1,aspect$
whole$=whole$+aspect$+Chr$(13)+Chr$(10)
Loop
Text1.Text=whole$
Close #1
Open"d:/test/smtext2.txt"For Output As #1
Print #1,()
Close #1
End Sub
上述程序的功能是,把磁盘文件smText1.txt的内容读到内存并在文本框中显示出来,然后把该文本框中的内容存入磁盘文件smtext2.txt。请填空。


[单项选择]在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Dim k As Integer Private Sub Form_Load( ) k=15 End Sub Private Sub Command1_Click( ) Static b As Integer b=b+k k=k+1 Print k,b End Sub 程序运行时,两次单击命令按钮Command1后,在窗体上显示的第二行是( )。
A. 17 31
B. 15 31
C. 17 16
D. 2 1
[单项选择]在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Dim SW As Boolean Function func(X As Integer)As Integer IfX<20 Then Y=X Else Y=20+X End lf func=Y End Function Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) SW=False End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As SinSle,Y As Single) SW=True End Sub Prinvate Sub Command1_Click( ) Dim intNum As Integer intNum=InputBox(””) If SW Then Print func(intNum) End If End Sub 程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为
A. 输出0
B. 输出25
C. 输出45
D. 无任何输出
[单项选择]在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Dim SW As Boolean Function func(X As Integer) As Integer If X < 20 Then Y = X Else Y = 20 + X End If func = Y End Function Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) SW = False End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) SW = True End Sub Private Sub Command1_Click( ) Dim intNum As Integer intNum = InputBox("") If SW Then Print func(intNum) End If End Sub 程序运行后,单击命令按钮,将显示一个输入对话框,如果在输入对话框中输入25,则 程序的执行结果为______。
A. 输出0
B. 输出25
C. 输出45
D. 无任何输出

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码