Problem with messageboxes generated by Topmost window after losing focus

C

Claire

I need my communication status window to be topmost when it's open/active.
Ive set the TopMost property of the form to true and it does work ok.
After performing tasks this window generates an error or confirmation
messagebox. If this window is the Active/Selected window then the messagebox
appears in front of it ok. If I click on another application before the
messageboxes are generated, then they appear and are hidden behind the
topmost status window.
This "feature" is constantly being raised by our test team and I need to
stop it happening.
(Running the software on XP pro.)

Any advice would be appreciated.
 
A

Adam Barker

Before the MessageBox is due to appear, call Activate() on the calling form.
This makes your app activate (and frontmost) and your MessageBox will appear
on 'top' of this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top