Connecting Tech Pros Worldwide Forums | Help | Site Map

message box

Newbie
 
Join Date: Oct 2009
Posts: 27
#1: 3 Weeks Ago
hi,
i waana call a function when the ok button of the message box is clicked.
some suggestion plz

tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,784
#2: 3 Weeks Ago

re: message box


Expand|Select|Wrap|Line Numbers
  1. System.Windows.Forms.DialogResult result = MessageBox.Show("Are you sure", "Close?", MessageBoxButtons.OkCancel,MessageBoxIcon.Question);
  2.  if (result == System.Windows.Forms.DialogResult.Ok) 
  3. {
  4. // Do your thing here
  5. }
  6.  
Reply