Question about the MessageBox

  • Thread starter Thread starter Claudia Fong
  • Start date Start date
C

Claudia Fong

Hi,

I have a MessageBox showing a message that the data has been added. It's
a messageBox containing a MessageBoxButtons.OK. I would like to after
the messagebox show and I click on button OK, all the textBox.Text will
be clear

textBox1.Text = ""
textBox2.Text = ""
textBox3.Text = ""

MessageBox.Show("The data has been added","Add department
name",MessageBoxButtons.OK,MessageBoxIcon.Information);


Cheers!

Claudi
 
I'm not sure I understand your problem clearly. If you want to clear
the text boxes after the user clicks OK in the message box, why not
just put the code you posted to clear the text boxes after the
MessageBox.Show()? MessageBox.Show() is modal, so the next line of code
won't run until the user dismisses the message box.

That's why I think I must be missing something...?
 
Back
Top