单项选择题

在窗体上画一个通用对话框,其名称为CommonDialog1,然后画一个命令按钮,并编写如下事件过程: Private Sub Command1_Click() CommonDialog1.Flags=vbOFNHideReadOnly CommonDialog1.Filter="All Files(*.*)|*.*|Text Files(*.txt)|*.txt CommonDialog1.FiherIndex=1 CommonDialog1.ShowOpen MsgBox CommonDialog1.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是

A.All Files(*.*)
B.Text Files(*.*)
C.*.txt
D.All Files(*.*)|Text Files(*.*)
热门 试题

单项选择题
设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,哪个事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是 A) Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End Sub B) Private Sub Form_MouseDown(ButtonAsInteger,ShiftAsInteger,X As Single,Y As Single) PopupMenu a1,0 End Sub C) Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,X As Single,Y As Single) PopupMenu a1 End Sub D) Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu a1 End Sub
设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,哪个事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是 A) Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End Sub B) Private Sub Form_MouseDown(ButtonAsInteger,ShiftAsInteger,X As Single,Y As Single) PopupMenu a1,0 End Sub C) Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,X As Single,Y As Single) PopupMenu a1 End Sub D) Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu a1 End Sub