Problem with messageboxes generated by Topmost window after losing focus

  • Thread starter Thread starter Claire
  • Start date Start date
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.
 
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.
 
Back
Top