MessageBox

  • Thread starter Thread starter vinnie
  • Start date Start date
V

vinnie

Anyone knows if a Message Dialogue Box (MessageBox) is available in
the Toolbox panel, or if i have to write all the time the code to
create it?

Thanks
 
vinnie said:
Anyone knows if a Message Dialogue Box (MessageBox) is available in
the Toolbox panel, or if i have to write all the time the code to
create it?

It is not in the toolbox, but the code is merely (if memory serves me
right):

MessageBox.Show("text","title");

with some variations for boxes with more buttons on them, e.g.,

DialogResult r = MessageBox.Show(...);

for capturing the result.

You do not have to design the MessageBox window yourself -- it's there
already, in the operating system. I've written some quick and dirty
programs that use MessageBox as their only form of output!
 
No as a toolbox item - however, MessageBox.Show(...) should do what
you need, with very little code.

Marc
 
Back
Top