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

[单项选择]在窗体上画一个命令按钮,名称为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,然后编写如下程序: "的相关试题:

[单项选择]在窗体上画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,然后编写如下程序: 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. 无任何输出
[单项选择]在窗体上画一个名称为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. 无任何输出
[填空题]在窗体上画一个通用对话框,其名称为CommonDialog1,然后画一个名称为Command1的命令按钮,并编写如下事件过程: Private Sub Command1_ Click( ) CommonDialog1. Flags = cd10FNHideReadOnly CommonDialog1. Filter= "All Files (*.*) |*.* |Text Files" & "(*.txt |*.txt|Batch Files (*.bat)|*.bat)" CommonDialog1. FilterIndex = 1 CommonDialog1.ShowOpen MsgBox CommonDialog1.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是 ______ ;如果在对话框中选择D盘temp 目录下的te1.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
我已记住账号密码