[.net] A really stupid VB.net question

Started by
2 comments, last by Zul 19 years, 6 months ago
I am using the MessageBox.Show(parameters blah blah) method and I want to make it so the end user DOES NOT have the ability to move the message box around their screen or bring any windows in front of it until they click OK, how do I do this? Liszt
Advertisement
Preventing *any* windows in front and not being able to move the messagebox by using the standard API is not possible.

Preventing windows of the application can be done by setting the owner window of the messagebox to a window of the application.

Make your own messagebox form to make it topmost and not-movable.

BTW: to do so is really bad: Window systems are meant to be multi-tasking! If your messagebox decides to stop functioning the whole system might be unreachable...

Cheers
You shouldn't do that. You are not supposed to do that. Your programs should always "play nice" with windows. And as far as I know .NET doesnt let you do stuff like this (by design).
As the others said, you shouldn't do that, and you can't with the options in MessageBox.Show. If you're trying to stop your application until the user clicks the button on your message box, why don't you just disable any active forms until you get a positive return value from the message box?
oh hai

This topic is closed to new replies.

Advertisement