message box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siddhanta
    New Member
    • Oct 2009
    • 33

    #1

    message box

    hi,
    i waana call a function when the ok button of the message box is clicked.
    some suggestion plz
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Code:
    System.Windows.Forms.DialogResult result = MessageBox.Show("Are you sure", "Close?", MessageBoxButtons.OkCancel,MessageBoxIcon.Question);
     if (result == System.Windows.Forms.DialogResult.Ok) 
    {
    // Do your thing here
    }

    Comment

    Working...