|
-
February 9th, 2005, 11:19 PM
#1
How to Make Message Box as Modal
HI,
Iam using the MessageBoxes in my Appliation. These Message Boxes are used to display the Exception messages encountered during the User Operation on the Application.
MessageBox.Show(Message,Title,Buttons,Icons);
These MessageBoxes are displaying the messages in Modeless Way, i want these MessageBoxes to be Modal. Please suggest a way to achieve the same.
Thanks in Advance,
Harry
-
February 10th, 2005, 12:55 AM
#2
Re: How to Make Message Box as Modal
You need to call the other Show method that supplies a parent for the MessageBox dialog to have it behave in a modal way.
The method I'm describing has the parent described as a "IWin32Window" data type in it's first parameter.
Obviously the parent specified should be the parent window you want this to be a child of.
Hope this helps,
- Nigel
-
February 21st, 2005, 11:23 PM
#3
Re: How to Make Message Box as Modal
Thanks for ur reply.
I had used the other way. Something like this,
DialogResult dlgResult = MessageBox(Message,Title,Buttons,Icons);
This makes the Message Box Modal and can be used to check the User Choice also.
Harry
-
February 22nd, 2005, 02:51 AM
#4
Re: How to Make Message Box as Modal
Code:
DialogResult dlgResult = MessageBox.Show(Message,Title,Buttons,Icons);
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
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
|