更多"在窗体中添加一个通用对话框Commondialog1和一个命令按钮Co"的相关试题:
[单项选择]在窗体中添加一个通用对话框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的命令按钮。要求单击命令按钮时,打开一个保存文件的通用对话框窗口。该窗口的标题为“Save”,默认文件名为“SaveFile",在“文件类型”栏中显示“*.txt”。能够满足上述要求的程序是 ______ 。
A. Private Sub Command1_ Click() CommonDialog1. FileName = "SaveFile" CommonDialog1. Filter = "All Files | *.* |*.txt *.txt| *.doc| *.doc" CommonDialog1. Filterlndex = 2 CommonDialog1. DialogTitle = "Save" CommonDialog1. Action = 2 End Sub
B. Private Sub Command1_Click() CommonDialog1. FileName = "SaveFile" CommonDialog1. Filter = "All Files |*.* | *.txt|*.txt|*.doc|*.doc" CommonDialog1. Filterlndex = 1 CommonDialog1. DialogTitle = "Save" CommonDialog1. Action = 2 End Sub
C. Private Sub Command1_ Click() CommonDialog1. FileName = "Save" CommonDialog1. Filter = "All Files |%* |*.txt|*.txt|*.doc|*.doc" CommonDialog1. Filterlndex = 2 CommonDialog1. DialogTitle = "Save" CommonDialog1. Action = 2 End Sub
D. Private Sub Command1_ Click() CommonDialog1. FileName = "SaveFile" CommonDialog1. Filter = "All Files |*.*|*.txt|*.txt|*.doc|*.doc" CommonDialog1. Filterlndex = 1 CommonDialog1. DialogTitle = "Save". CommonDialog1. Action = 1 End Sub
[单项选择]在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮,要求单击命令按钮时,打开一个保存文件的对话框,该窗口的标题为“Save”,缺省文件名称为“SaveFile”,在“文件类型”栏中显示*txt,则能够满足上述要求的程序是( )。
A. java
B. javac
C. javap
D. javadoc
[单项选择]在窗体上画一个名称为CommonDialog1的通用对话框和一个名为Command1的命令按钮。要求实现这样一个功能:单击命令按钮后,打开一个通用对话框用于保存文件,其窗口标题为“保存”,默认文件名为Data,在“文件类型”栏中显示*.txt。下列程序中能实现以上功能的是______ 。
A. Private Sub Command1_ Click() CommonDialog1. FileName = "Data" CommonDialog1. Filter = "All Files|*.|* |(*.tx|(*.do|*.doc" CommonDialog1. Filterlndex = 2 CommonDialog1. DialogTitle = “保存” CommonDialog1. Action = 2 End Sub
B. Private Sub Command1_ Click() CommonDialog1. FileName = "Data" CommonDialog1. Filter = "All Files|*.*|(*.tx|(*.do|*.doc" CommonDialog1. FilterIndex = 2 CommonDialog1. DialogTitle =“保存” CommonDialog1. Action = 1 End Sub
C. Private Sub Command1_ Click() CommonDialog1. FileName = "Data" CommonDialog1. Filter = "All Files|*.*|(*.tx|(*.do|*.doc" CommonDialog1. FilterIndex = 1 CommonDialog1. DialogTitle = “保存” CommonDialog1. Action = 1 End Sub
D. Private Sub Command1_ Click() CommonDialog1. FileName = "Data" CommonDialog1. Filter = "All Files|*.*|(*.tx|(*.do|*.doc" CommonDialog1. FilterIndex = 1 CommonDialog1. DialogTitle = “保存” CommonDialog1. Action = 2 End Sub
[单项选择]假定通用对话框的名称为CommonDialog1,命令按钮的名称为Command1,则单击命令按钮后,能使打开的对话框的标题为“New Title”的事件过程是()。
A. Private Sub Commandl_Click() CommonDialog1.DialogTitle="NewTitle" CommonDialog1.ShowPrinter End Sub
B. Private Sub Command1_Click() CommonDialog1.DialogTitle="NewTitle" CommonDialog1.ShowFont End Sub
C. Private Sub Commslld1_CUck() CommonDialog1.DialogTifie="NewTitle" CommonDialog1.ShowOpen End Sub
D. PrivateSubCommand1_Click() CommonDialog1.DialogTitle”NewTitle” CommonDialog1.ShowColor End Sub