![]() ![]() Public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags) Private const UInt32 TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE Īdd prototype for user32.dll function: Private const UInt32 SWP_NOMOVE = 0x0002 Private const UInt32 SWP_NOSIZE = 0x0001 ![]() It's an option, anyway.įirst, import the following namespace: using Īdd a few variables to your class declaration: private static readonly IntPtr HWND_TOPMOST = new IntPtr(-1) What I did was make a call to "user32.dll." I had no qualms about doing so and it works great. I knew it was possible because WinAmp does this (along with a host of other applications). I was searching to make my WinForms application "Always on Top" but setting "TopMost" did not do anything for me. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |