Jump to content
  • Advertisement
Sign in to follow this  
Liszt

[.net] A really stupid VB.net question

This topic is 5391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!