Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Making a System Modal Message

Question:
How can I make it so that a form will stay on top until the user presses a button? For example, an error message pops up, the user can't click elsewhere on the screen to close the window until he presses the button.

Answer:
Using the MsgBox function, you can make a message System Modal, which will prevent them from doing anything in ANY application until they answer the question. When you use the MsgBox call, add in the MB_SYSTEMMODAL constant to the other constants which determine buttons, icons and such to display. The constant is listed in CONSTANT.TXT. For VB4, see the Help for MsgBox and use either vbApplicationModal or vbSystemModal.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date