Typical Info Message Box

	MessageBox::Show(L"Message Text", L"Message Box Title", MessageBoxButtons::OK, MessageBoxIcon::Information);

Typical Error Message Box

//1st string is message, 2nd string is box title.  Here's a classic error message usage:
catch (Exception^ e)
	MessageBox::Show(L"Comms Failed with the following error:\n" + e, L"Error", MessageBoxButtons::OK, MessageBoxIcon::Error);

Exclamation Error Box

MessageBox::Show(L"You can't do this", L"Not Possible", MessageBoxButtons::OK, MessageBoxIcon::Asterisk);

Select OK To Continue Message Box

if (
				L"Are you sure you want to do this?",
				) == System::Windows::Forms::DialogResult::Yes)

Message Box – Dealing With Multiple Options

	System::Windows::Forms::DialogResult Result;
	Result = MessageBox::Show(
					L"Would you like to save changes to the current settings and layout?",
					L"Save Changes?",
	if (Result == System::Windows::Forms::DialogResult::Cancel)
	else if (Result == System::Windows::Forms::DialogResult::Yes)
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.