举一反三
- 下列( )事件过程可以将打开文件对话框的标题改变为“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
- 以下事件过程可以将打开的对话框的标题改为“宇宙大爆炸”的是 A: Private Sub Command2_Click( ) CommonDialog1.DialogTitle=“宇宙大爆炸” CommonDialog1.ShowOpen End Sub B: Private Sub Command2_Click( ) CommonDialog1.DialoTitle=“宇宙大爆炸” CommonDialog1.ShowFont End Sub C: Private Sub Command2_Click( ) CommonDialog1.DilogTitle=“宇宙大爆炸” CommonDialog1.Show End Sub D: Private Sub Command2_Click( ) CommonDialog1.DialogTitle=“宇宙大爆炸” CommonDialog1.ShowColor End Sub
- 在以下事件过程中,Private表示。Private Sub txtName_Change()……End Sub
- 执行下列事件过程,y的值为。 Private Sub Command1_Click() x = 3 If x > 10 Then y = x ^ 2 + 3 * x + 2 Else If x > 5 Then y = 3 * x + 2 Else y = 5 End If End If End Sub
- 单击按钮Command1,下列代码执行的结果是()。 Private Sub Command1_Click() Call pro(3) End Sub Private Sub pro(b As Integer) MsgBox b*b End Sub
内容
- 0
假定通用对话框的名称为CD1,命令按钮的名称为Commandl,则单击命令按钮后,能使打开对话框的标题为“通用对话框”的事件过程是( )。 A: Private Sub Commandl_Click() CD1.DialogTitle=“通用对话框” CD1.ShowPrinter End Sub B: Private Sub Commandl_Click() CD1.DialogTitle=“通用对话框” CD1.ShowFont End Sub C: Private Sub Commandl_Click() CD1.DialogTitle=“通用对话框” CD1.ShowOpen End Sub D: Private Sub Commandl_Click() CD1.DialogTitle=“通用对话框” CD1.ShowColor End Sub
- 1
设窗体上有一个标签Label 1和一个计时器Timer1,Timer1的Interval属性被设置为1000, Enabled属性被设置为True。要求程序运行时每秒在标签中显示一次系统当前时间。下列可以实现上述要求的事件过程是( )。 A: Private Sub Timer1_Timer() Labell.Caption=True End Sub B: Private Sub Timer1_Timer() Labell.Caption=Time$ End Sub C: Private Sub Timer1_Timer() Labell.Interval=1 End Sub D: Private Sub Timer1_Timer() For k=1 To Timerl.Interval Label1.Caption=Timer Next K End Sub
- 2
下列( )事件过程可以将打开文件对话框的标题改变为“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
- 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
工程中有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