A: Private Sub Command1_Click( ) Commondialog1.ShowOpen End Sub
B: Private Sub Command1_Click( ) Commondialog1.ShowColor End Sub
C: Private Sub Command1_Click( ) Commondialog1.ShowOpen Commondialog1.ShowFont End Sub
D: Private Sub Command1_Click( ) Commondialog1.ShowColor Commondialog1.ShowHelp End Sub
举一反三
- 在窗体中添加一个通用对话框Commondialog1和一个命令按钮Command1,当单击按钮时,打开颜色对话框,能实现此功能的程序段是 A: Private Sub Command1_Click( ) Commondialog1.ShowOpen End Sub B: Private Sub Command1_Click( ) Commondialog1.ShowColor End Sub C: Private Sub Command1_Click( ) Commondialog1.ShowOpen Commondialog1.ShowFont End Sub D: Private Sub Command1_Click( ) Commondialog1.ShowColor Commondialog1.ShowHelp End Sub
- 假定通用对话框的名称为CommonDialog1,命令按钮的名称为Command1,则单击命令按钮后,能使打开的对话框的标题为“New Title”的事件过程是( )。 A: Private Sub Command1_Click() B: CommonDialog1.DialogTitle="New Title" C: CommonDialog 1.ShowPrinter D: End Sub E: Private Sub Command1_Click() F: CommonDialog1.DialogTitle="New Title" G: CommonDialog1.ShowFont H: End Sub I: Private Sub Command1_Click() J: CommonDialog1.DialogTitle="New Title" K: CommonDialog1.ShowOpen L: End Sub M: Private Sub Command1.Click() N: CommonDialog1.DialogTitle="New Title" O: CommonDialog1.ShowColor P: End Sub
- 在窗体中添加一个通用对话框Commondialog1和一个命令按钮Command1,当单击按钮时,打开颜色对话框,能实现此功能的程序段是 A: Private Sub Command1_Click()Commondialogl.ShowOpenEnd Sub B: Private Sub Command1_Click()Commondialog1.ShowColorEnd Sub C: PrivateSubCommand1_Click()Commondialog1.ShowOpenCommondialog1.ShowFontEnd Sub D: Private Sub Command1_Click()Commondialog1.ShowColorCommondialog1.ShowHelpEnd Sub
- 下列( )事件过程可以将打开文件对话框的标题改变为“new Caption”。 A: Private Sub Command1_CliCk() CommonDialog1.DialogTitle="new Caption" CommonDialog1.ShowFont End Sub B: Private Sub Command1_Click() CommonDialog1.DialogTitle="new Caption" CommonDialog1.ShowOpen End Sub C: Private Sub Command1_Click() CommonDialog1.DialogTitle="new Caption" CommonDialog1.Show Help End Sub D: Private Sub Command1_Click() CommonDialog1.DialogTitle="new Caption" CommonDialog1.ShowColor End Sub
- 工程中有2个窗体,名称分别为Form1、Form2,Form1为启动窗体,该窗体上有命令按钮Command1。要求程序运行后单击该命令按钮时显示Form2,则按钮的Click事件过程应该是______。 A: Private Sub Command1_Click() Form2.Visible End Sub B: Private Sub Command1_Click() Form2.Show End Sub C: Private Sub Command1_Click() Form2.Load End Sub D: Private Sub Command1_Click() Load Form2 End Sub
内容
- 0
下列( )事件过程可以将打开文件对话框的标题改变为“new Caption”。 A: Private Sub Command1_Click() B: CommonDialog1.DialogTitle="new Caption" C: CommonDialog1.ShowFont D: End Sub E: Private Sub Command1_Click() F: CommonDialog1.DialogTitle="new Caption" G: CommonDialog1.ShowOpen H: End Sub I: Private Sub Command1_Click() J: CommonDialog1.DialogTitle="new Caption" K: CommonDialog1.ShowHelp L: End Sub M: Private Sub Command1_Click() N: CommonDialog1.DialogTitle="new Caption" O: CommonDialog1.ShowColor P: End Sub
- 1
声明一个变量为局部变量应该用( )。 A: Private Sub Command1 Click() n=5:x=1 Do X=X * I I=I + 1 Loop While I < n Print x End Sub B: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End Sub C: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End Sub D: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I>n Print X End Sub
- 2
工程中有两个窗体,名称分别为Form1、Form2,Form1为启动窗体,该窗体上有命令按翎Command1.要求程序运行后单击该命令按钮时显示Form2,则按钮的Click事件过程应该是 A: Private Sub Command1_Click() B: Form2.Show C: End Sub D: Private Sub Command1_Click() E: Form2.Visible F: End Sub G: Private Sub Command1_Click() H: Load Form2 I: End Sub J: Private Sub Command1_Click() K: Form2.Load L: End Sub
- 3
设工程中有Form1、Form2两个窗体,要求单击Form2上的Command1命令按钮,Form2就可以从屏幕上消失,下面的事件过程中不能实现此功能的是 A: Private Sub Command1_Click() Form2.Hide End Sub B: Private Sub Command1_Click() Unload Me End Sub C: Private Sub Command1_Click() Form2.Unload End Sub D: Private Sub Command1_Click() Me.Hide End Sub
- 4
在窗体上有一命令按钮Command1,其Click事件代码如下: Private Sub Command1_Click() Dim a%, b%, i%, n% For i = 1 To 10 n = InputBox("请输入一个整数", "输入数据框", 2) If n Mod 2 = 0 Then a = a + 1 Else b = b + 1 End If Next i MsgBox ("运行结果a=" & str(a) & ", b=" & str(b)) End Sub