Message Box

molemenacer

Active member
Joined
Jul 27, 2006
Messages
27
Location
Haywards Heath, UK
Programming Experience
Beginner
Hi all,

I am having trouble with message boxes

This is my message box

MsgBox( strMessage, MsgBoxStyle.Exclamation, "Cannot approve" )

and i want it to appear on top of all the forms. Currently when the message box appears it appears behind another window.

Is there a way to make it appear at the top of all the windows?

Thanks in advance
 
The messagebox will only go on top of the windows that belong to your own application. To top other applications you must create your own dialog form (use the Dialog form template) and set TopMost=True.
 
Thanks for that JohnH

The program launches an instance of word with some text and when a button is clicked (inside word) a check is carried out. If that fails i want to show a message box to tell them the problem. The error is that the message box is displayed behind the open word window. Will i have to create my own dialog form to get this to display?
 
Back
Top