Want more features on Pastebin? Sign Up, it's FREE!
Guest

MessageForm (Form)

By: a guest on Jul 2nd, 2011  |  syntax: C#  |  size: 0.64 KB  |  views: 1,870  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Windows.Forms;
  3.  
  4. internal partial class MessageForm : Form
  5. {
  6.     internal MessageForm()
  7.     {
  8.         InitializeComponent();
  9.     }
  10.  
  11.     private void btnYes_Click(object sender, EventArgs e)
  12.     {
  13.         this.DialogResult = DialogResult.Yes;
  14.     }
  15.  
  16.     private void btnNo_Click(object sender, EventArgs e)
  17.     {
  18.         this.DialogResult = DialogResult.No;
  19.     }
  20.  
  21.     private void btnCancel_Click(object sender, EventArgs e)
  22.     {
  23.         this.DialogResult = DialogResult.Cancel;
  24.     }
  25.  
  26.     private void btnOK_Click(object sender, EventArgs e)
  27.     {
  28.         this.DialogResult = DialogResult.OK;
  29.     }
  30. }
clone this paste RAW Paste Data