form calling a form question

G

Gidi

Hi,

I've a main Window form, which sometimes calls a new form, with a textBox
and a ok button. (I'm trying to make it to look and feel like a MessageBox).

My problem is that when i'm minimizing the main window, and then maximizing
it, the messgeBox form is not shown (i need to open it from the explorer
bar). How can I make it to be a a part of the form?

I need something like ShowDialog which will make my mainForm to wait for the
MessageBox form will be closed in order to continue.

Thanks,
Gidi.
 
C

Ciaran O''Donnell

in the main form, you can call ShowDialog on the sub form and to make it
allways appear on top, pass the main form as the owner parameter. Then
windows knows the relationship.
 
M

Marc Gravell

Make sure you pass the form in as the first (IWin32Window) argument,
typically:

MessageBox.Show(this, "Foo", "Bar"); // add other args as needed

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top