• Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

[C#] Custom MessageBox

Elite_Modz

Active Poster
Retired Staff
Active Member
Console ID Poster
Code:
static MessageBox1 MsgBox; static DialogResult result = DialogResult.No;
  public static DialogResult Show(string Text, string Caption, string btnOK, string btnCancel, bool action)
  {
  MsgBox = new MessageBox1();
  MsgBox.label1.Text = Text;//Text
  MsgBox.button2.Text = btnOK;//OK
  MsgBox.button1.Text = btnCancel;//Cancel
  MsgBox.label2.Text = Caption;//Caption
  result = DialogResult.No;
  MsgBox.ShowDialog();
  return result;

  if (action == true)
  {
     
  }
  else if (action == false)
  {

  }
  else
  {

  }
  }

View Source:
 
Last edited:
General chit-chat
Help Users
  • No one is chatting at the moment.


      You do not have the permission to use the chat.
      @ QM|T_JinX: :weed:
      Back
      Top