'Window on top' button (SetWinEventHook)

Post your working scripts, libraries and tools
Posts: 49
Joined: 05 Dec 2015, 01:07

'Window on top' button (SetWinEventHook)

19 Jul 2018, 19:27

I used to use FileBox eXtender (an old discontinued program) mainly for the window-on-top button on Vista. Unfortunately it wasn't working for me on Win 7 nor on any newer version of Windows.
So in order to have a window-on-top button after being gradually forced off Vista (Firefox) I had to make this script using SetWinEventHook (EWinHook_SetWinEventHook function by cyruz) and +Owner option.
It's easier to do it with parent option (+Parent or Dllcall), child windows and ShellHook like in the Windows Explorer toolbar script, but in that case the button can't be on the title bar. So the more complicated option is necessary.

Weirdly, when searching regedit.exe, the script processor usage goes high. It's obviously the SetWinEventHook-related issue, but I'm not sure why exactly. So it may need some improvements.

● choose "On Top" switch icon with: onTopPinIcon:= (1 or 2)
● choose transparent: transpGUI:=1
● for slow starting windows click on title bar to show the "On Top" switch icon

Code: [Select all] [Expand] [Download] (WinOnTopButtonDrozd.ahk)GeSHi © Codebox Plus

WinExplorerToolsDrozd.png (92.14 KiB) Viewed 124 times

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Google [Bot] and 18 guests