ToolWindow Activate method differences

Docking/MDI for Windows Forms Forum

Posted 9 years ago by Tom Johnson
Version: 16.1.0330
Avatar

I have two floating tool windows.   Let's call them A and B.   B is covering up A.   A wants to display a message in its control and bought to the user's attention.  If I call, Activate(false) on A, nothing really seems to happen.   If I just call Activate(), A is moved to the top and gets focus.   I would like to move A above B and keep focus on whatever control in the rest of the app had focus.   Any suggestions?

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

I wonder if you could do ToolWindow.FindForm() to get the Form that is hosting the floating tool window.  You can't really call Activate() on that since I believe that will focus the Form's content too.  But you might be able to use the Windows API's SetWindowPos with SWP_NOACTIVATE as described in this thread:

http://stackoverflow.com/questions/156046/show-a-form-without-stealing-focus

That would likely let you bring the Form to the top without activating it.


Actipro Software Support

The latest build of this product (v25.1.0) was released 21 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.