Prevent Status Panels losing the focusby Geoff Furlong
Prevent Status Panels losing the focusEver wondered how to make VDF panels "stay on top"? Try the following code in your panel/dialog/etc Activating procedures // To make the status_panel stay-on-top, we first find it's window handle ... Move (FindWindow("DFDialogClass", Caption_Text(Self))) To hWnd# // ... then we add the extended style WS_EX_TOPMOST to the window, but we use SetWindowPos // to make sure the change takes effect immediately. Move (SetWindowPos(hWnd#, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE ior SWP_NOSIZE)) To swp# I've used this to make the BPO status panel stay where it should and not disappear if the VDF app loses the focus.
With a little change to the above the status panel will also support special characters. This way it will also work in programs that are written for non-english languages. replace the line Move (FindWindow("DFDialogClass", Caption_Text(Self))) To hWnd# with Move (FindWindow("DFDialogClass",ToAnsi(Caption_Text(Self)))) to hWnd# |
|||||||||||
Copyright © 1999 - 2024 VDF-GUIdance on all material published, for details see our Disclaimer. |