public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form f = new Form();
f.WindowState = FormWindowState.Maximized;
f.FormBorderStyle = FormBorderStyle.None;
f.Opacity = 0.5;
f.Load += new EventHandler(f_Load);
f.Show();
}
void f_Load(object sender, EventArgs e)
{
MessageBox.Show("This is a modal window");
((Form)sender).Close();
}
}
this might help you