How to shorten or convert the full path for the RESULT from Messagebox()
The following is tried and is NOT working
::Yes
DialogResult::Yes
::DialogResult::Yes
etc...
So I have to include the full path -> System::Windows::Forms::DialogResult::Yes
CODE used (yes this is compiled, build and runs OK):
if (MessageBox::Show("Do you want to exit?","My Application", MessageBoxButtons::YesNo,MessageBoxIcon::Question)==System::Windows::Forms::DialogResult::Yes)
{
MessageBox::Show("You pressed YES!", "STATUS INDICATION");
}
else
{
MessageBox::Show("You pressed NO!", "STATUS INDICATION");
}
But I'm sure there is a simpler more userfriendly way.
***********************************************************************
I can give more information if necessary on the where the code is used
some info is maybe interesting:
It's within
private BUTTONclick {
}
in the GUI.H file made by Visual Studio 2010 after building a GUI with a button and here I describe what should happen and in this case I want to give the user a choice. So it's NOT the MAIN.CPP file, as this ONLY opens the form (the GUI itselve).
Super THANKS!
Really wonder why this is not easy to find!
As I made several searches on the internet.
It also makes me aware that I have to do some reading in classes and framework etc..! Has been long time using C++ and I see some things have vanished true the years.