Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with messageboxes generated by Topmost window after losing focus

Claire
Guest
 
Posts: n/a
#1: Nov 17 '05
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.



Adam Barker
Guest
 
Posts: n/a
#2: Nov 17 '05

re: Problem with messageboxes generated by Topmost window after losing focus


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.

"Claire" <czeshirecat@community.nospam> wrote in message
news:OtEOEDfZFHA.3132@TK2MSFTNGP09.phx.gbl...[color=blue]
>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.
>[/color]


Claire
Guest
 
Posts: n/a
#3: Nov 17 '05

re: Problem with messageboxes generated by Topmost window after losing focus


Thank you Adam


Closed Thread


Similar C# / C Sharp bytes