How to simulate MessageBox behavior?

  • Thread starter Thread starter Du Dang
  • Start date Start date
D

Du Dang

I want to simulate the behavior of the messagebox;
I show the messagebox, and when it finished it return to where I called the
"MessageBox.Show()"

Form A:
showFormB(){
Show form B

// when form b is finished
// i want it to return here
}

I want form A and form B to be on the same thread, running serially rather
than running parrallel to each other

thanks,

Du
 
Just derive your form B from System.Windows.Forms.Form class and call
ShowDialog()

In your form A

frmB bForm = new frmB()
frmB.ShowDialog()
'things to do after showing form B

Hope that helps

Quoc Khanh
 
Nice!!!

It works like a charm. :-)
Thank you for your help!

Ca'm on Kha'nh nhieu nha (extra vietnamese gratitude)

Du
 

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

Similar Threads

async 7
Messagebox appears behind form 1
Timed MessageBox 2
Kill a MessageBox 1
how to clear keyboard buffer? 6
MessageBox in multi threaded app 7
Unit tests and Messagebox 7
Format text in a messagebox 6

Back
Top