更多"VBA语言中,______函数的功能弹出一个消息对话框。"的相关试题:
[填空题]VBA语言中,______函数的功能弹出一个消息对话框。
[填空题]VBA语言中,______函数的功能是弹出一个消息对话框。
[填空题]在VBA语言中,______函数的功能是弹出一个消息对话框。
[简答题]本题中,主窗口有一个按钮“打开对话框”和一个文本域,单击按钮“打开对话框”后会弹出一个对话框,对话框上有两个按钮“Yes”和“No”,单击对话框上的“Yes”和“No”按钮后返回主窗口,并在右侧文本域中显示刚才所单击的按钮信息。
import java.awt.event.*;
import java.awt.*;
class MyDialog______implements ActionListener
static final int YES=1,NO=0;
int message=-1;Button yes,no;
MyDialog(Frame f,String s,boolean b)
super(f,s,b);
yes=new Button("Yes");yes.addActionListener(this);
no=new Button("No");no.addActionListener(this);
setLayout(new FlowLayout( ));
add(yes);add(no);
setBounds(60,60,100,100);
addWindowListener(new WindowAdapter( )
public void windowClosing(WindowEvent e)
message=-1;setVisible(false);
);
public void actionPerformed(ActionEvent e)
if(e.getSource( )==yes)
message=YES;
setVisible(false);
else if(e.getSource( )==no)
message=NO;
setVisible(false);
public int getMessage( )
return message;
class Dwindow extends Frame implem
[填空题]MESSAGEBox( )函数的功能是显示一个用户自定义对话框。若未指定该对话框的标题,则对话框的默认标题为:( )
[填空题]以下程序代码用来实现如下功能:单击命令按钮弹出对话框,在其中输入正数后单击确定,弹出一个提示信息显示刚才输入的正数,否则提示"error"。请填空。
Private Sub Command1_Click( )
Dim a As Integer,b As String
a=InputBox("请输入一个正数")
If a > 0 Then
______
Else
b=MsgBox("error",0)
End If
End Sub
[填空题]下面一段程序的功能是,单击窗体弹出对话框。在对话框中输入一个文件名,窗体中输出该文件名的文件号。请填空。
Private Sub Form_ click( )
filename = InputSox (“请输入文件名”)
Filecode =
Open filename For Output As # Filecode
Print filename; “的文件号是”; Filecode
Close # Filecode
End Sub
[单项选择]下列程序的功能是调用字体对话框来设置文本框字体,单击按钮弹出对话框后,按Cancel 键退出对话框,则( )。
Private Sub Command1_Click( )
CommonDialogl.CancelError=True
CommonDialogl.Flags=cdlCFEffects Or cdlDFBotb
CommonDialogl.Action=4
CommonDialogl.ShowFont
Text1.Font.Name=CommonDialogl.FontName
Text1.Font.Size=CommonDialogl.FontSize
Text1.Font.Bold=CommonDialog1.FontBold
Text1.Font.Italic=CommonDialog1.FontItalic
Text1.Font.Underline=CommonDialog1.FontUnderline
Text1.FontStrikethru=CommonDialog1.FontStrikethru
Text1.ForeColor=CommonDialog1.Color
End Sub
A. Text1的字体不发生变化
B. Text1的字体发生变化
C. Text1的字体和颜色发生变化
D. 程序出错!
[单项选择]下列程序的功能是调用字体对话框来设置文本框字体,单击按钮弹出对话框后,按Cancel键退出对话框,则 Private Sub Command1_Click( ) CommonDialogl.CancelError=True CommonDialogl.Flags=cdlCFEffects Or cdlDFBotb CommonDialogl.Action=4 CommonDialogl.ShowFont Text1.Font.Name=CommonDialogl.FontName Text1.Font.Size=CommonDialogl.FontSize Text1.Font.Bold=CommonDialog1.FontBold Text1.Font.Italic=CommonDialog1.FontItalic Text1.Font.Underline=CommonDialog1.FontUnderline Text1.FontStrikethru=CommonDialog1.FontStrikethru Text1.ForeColor=CommonDialog1.Color End Sub
A. Text1的字体不发生变化
B. Text1的字体发生变化
C. Text1的字体和颜色发生变化
D. 程序出错!
[简答题]本题是一个Applet,页面上有一个按钮“请单击”,单击该按钮后弹出一个对话框,对话框上有三个按钮“橙色”、“蓝色”和“红色”,单击其中任意一个按钮,则可以将对话框的背景色设置为按钮名称所对应的颜色。
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class java2 extends JApplet
private JFrame frame;
______( )
frame=new JFrame( );
frame.setTitle("java2");
frame.setSize(300,200);
frame.getContentPane( ).add(new ButtonPanel( ));
JButton PopButton=new JButton("请单击");
getContentPane( ).add(PopButton);
PopButton.addActionListener(new ActionListener( )
public void actionPerformed(ActionEvent evt)
if(frame.isVisible( ))frame.setVisible(false);
else______;
);
class ButtonPanel extends JPanel
private class ColorAction implements ActionListener
private Color backgroundColor;
public void actionPerformed(ActionEvent actionevent)
setBackground(backgrOundColor);
repaint( );
public ColorAction(
[填空题]下列程序的功能是:弹出一个对话框询问用户是否输出,如果是,则输出;否则结束。
请填空。
Sub PrintOutO
Dim aAs Integer
a=MsgBox("输出结果",vblnformation+vbYesNo,"提示:")
If a=______Then
Print "Myresult"
EndIf
EndSub