问题
单项选择题
下列( )事件过程可以将打开文件对话框的标题改变为“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.ShowHelp End Sub
D.Private Sub Command1_Click() CommonDialog1.DialogTitle="new Caption" CommonDialog1.ShowColor End Sub
答案
参考答案:B
解析: 可以通过DialogTitle属性设置打开文件刘话框的标题,使用ShowOpen方法设置通用刘话框的类型为打开文件对话框。 DialogTitle属性指定对话框中标题栏的名称。“打开”对话框默认的标题是“打开”;“另存为”对话框默认的标题是“另存为”。