|
-
July 16th, 2007, 02:34 AM
#1
MessageBox method
I using Visual C++ express edition 2005, when i click a button, it will shown a messagebox. I can write a simple code to show it, but it don hav error message, warning message, or information message.
This is my simple code:
Code:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
System::Windows::Forms::MessageBox::Show("Example", "YA");
}
Any body can help me to change the code to show the error message or warning message???
-
July 16th, 2007, 03:01 AM
#2
Re: MessageBox method
Hi!
Take a look here: MessageBox.Show Method
There are lots of different solutions ready for you!
Cheers,
Laitinen
-
July 16th, 2007, 05:53 AM
#3
Re: MessageBox method
You can use the AfxMessageBox("Message"); in case of Visual c++6.0
-
July 16th, 2007, 01:01 PM
#4
-
July 17th, 2007, 02:10 PM
#5
Re: MessageBox method
 Originally Posted by CooLWong
.. it will shown a messagebox. I can write a simple code to show it, but it don hav error message, warning message, or information message. ...
Is this what you require ?
MessageBox::Show("hello" , "test" , MessageBoxButtons::AbortRetryIgnore,
MessageBoxIcon::Error);
MessageBox::Show("hello" , "test" , MessageBoxButtons::AbortRetryIgnore,
MessageBoxIcon::Information);
-
July 17th, 2007, 07:17 PM
#6
Re: MessageBox method
 Originally Posted by Sahir
Is this what you require ?
yaya... i can work wif the sample code. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|