Use the system;
Use the system. Assemble. Generics;
Use the system. Component model;
Use the system. Data;
Use the system. Drawing;
Use the system. Text;
Use the system. Windows . Forms
Namespace WindowsApplication 1
{
Public partial classes Form 1: Form
{
The public string isNull = null// defines a global variable.
Public Form 1 ()
{
initialize component();
}
Private void button 1_Click (object sender, EventArgs e)
{
is null = convert . tostring(messagebox . show(" alarm 1 "," prompt 1 ")。 ToString());
}
Private void button2_Click (object sender, EventArgs e)
{
if (isNull == null)
{
MessageBox。 Display ("Alarm 2" and "Prompt 2");
}
other
{
MessageBox。 Show ("There is already a dialog box!" );
}
}
}
}