I have a Always On Top Tool Strip Menu option and I cant figure out the code that would make it stay on top of other windows when checked, and vice-versa when unchecked. Can you please help?
To set "always on top," set myForm.TopMost = True
from your menu option. See the Form.TopMost documentation.
To un-set it again, set myForm.TopMost = False
.
To toggle whether the Form
is the TopMost
, simply change the property Form.TopMost
.
For example, to set the Form to be on top, use this:
Form.TopMost = True
To disable TopMost
, use this:
Form.TopMost = False
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With