Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

MessageBox Class

Posted on November 19, 2013October 26, 2015 By David Kittell
Dim result = MessageBox.Show("Message To Display", "MessageBox Title", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)

If result = DialogResult.Cancel Then

    MessageBox.Show("Cancel Button Pressed", "MessageBox Title",MessageBoxButtons.OK , MessageBoxIcon.Exclamation)

ElseIf result = DialogResult.No Then

    MessageBox.Show("No Button Pressed", "MessageBox Title", MessageBoxButtons.OK, MessageBoxIcon.Error)

ElseIf result = DialogResult.Yes Then

    MessageBox.Show("Yes Button Pressed", "MessageBox Title", MessageBoxButtons.OK, MessageBoxIcon.Information)

End If
var result = MessageBox.Show("Message To Display", "MessageBox Title", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);


			if (result == DialogResult.Cancel)
			{
				MessageBox.Show("Cancel Button Pressed", "MessageBox Title", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);


			}
			else if (result == DialogResult.No)
			{
				MessageBox.Show("No Button Pressed", "MessageBox Title", MessageBoxButtons.OK, MessageBoxIcon.Error);


			}
			else if (result == DialogResult.Yes)
			{
				MessageBox.Show("Yes Button Pressed", "MessageBox Title", MessageBoxButtons.OK, MessageBoxIcon.Information);

			}
Originally Posted on November 19, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code CSharp VB.NET

Post navigation

Previous post
Next post

Related Posts

Validate Links

Posted on August 15, 2013October 26, 2015

function validatelink($link) { // Create a curl handle to a location $ch = curl_init($link); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_NOBODY, true); if (curl_exec($ch) === false) { echo ‘INVALID: ‘ . $link . " " . curl_error($ch); } else { echo ‘VALID: ‘ . $link; } // Close handle curl_close($ch); } Example

Read More

Mac OSX Terminal – Wi-Fi & Ethernet Switch

Posted on April 9, 2018

Sometimes you need to turn off Wi-Fi and turn on Ethernet and vice-versa NOTE: Important to know what your configuration is. sudo ifconfig en6 up && sudo ifconfig en0 down sudo ifconfig en6 down && sudo ifconfig en0 up All information on this site is shared with the intention to…

Read More

PowerShell Get All Environment Variables

Posted on November 6, 2015

If you need to know some of the system variables that are already set you can run this script to get the values Get-Childitem env: gci env: | sort name Once you know what variable you want you can do something like this Write-Host "Computer:`t" $env:COMPUTERNAME Write-Host "Domain:`t" $env:USERDOMAIN All…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes