Hiding topmost form when parent form deactivates

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

Hello,

My VB.NET application displays a Windows form in a panel
on my main form. While my application has the focus, I
want the form in the panel to have the "topmost"
position, even if it is not the active form.

Everything works as expected, but if the user selects
another application by pressing a tab in the taskbar,
then my "topmost" form still occupies the "topmost"
position.

How can I detect when a user selects another program by
pressing a tab on the taskbar? I would like to be able
to detect this and change the "topmost" attribute of my
form.

Thank you for any help.

Best regards,

Max
 
Take a look at the Form Deactivate event. It is fired when your form
is not the active window.

Good Luck,
Craig
 
Back
Top