code_junkie

How do I create a MessageBox in C#?

Nov 10th, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. MessageBox("Hello, World!");
  2.  
  3. MessageBox a = new MessageBox("Hello, World!");
  4.  
  5. if (MessageBox.Show("Do you want to continue?", "Question", DialogBoxButtons.YesNo) == DialogResult.Yes) {
  6. //some interesting behaviour here
  7. }
  8.  
  9. using System.Windows.Forms;
  10.  
  11. ...
  12.  
  13. MessageBox.Show( "hello world" );
  14.  
  15. MessageBox.Show("my message");
Add Comment
Please, Sign In to add comment