Hello at all
Is it possible to detect the events on the TaskBar ?
Have a good day
Detect TaskBar events [Resolved]
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Detect TaskBar events [Resolved]
Last edited by Kwai chang caine on Tue Apr 16, 2024 5:56 pm, edited 1 time in total.
The happiness is a road...Not a destination
Re: Detect TaskBar events
What type of events? But yes, you can detect mouse clicks, and if it's visible, etc. Not as "events" but you can manually poll for them.
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Detect TaskBar events
Hello BarryG
Thank for your answer
You want to say, a dirty mouse hovered over detection like i create and use since yesterday ?
Yes that works, but i througt rather to a nice API 
Because with my cow pat code, i just can detect the click or double-click, but not the hwnd or title of icon clicked
Perhap it exist a more serious way for see if an application is minimized in the taskbar, and restored from the taskbar
I have searched all yesterday and not found something like that
And also it's perhaps a way if i can list all the icons in the taskbar, with a loop for see if it change ?
Thank for your answer
You want to say, a dirty mouse hovered over detection like i create and use since yesterday ?
Code: Select all
hTray = FindWindow_("Shell_TrayWnd", 0)
HwndRebar = FindWindowEx_(hTray, 0, "ReBarWindow32", 0)
HwndTask = FindWindowEx_(HwndRebar, 0, "MSTaskSwWClass", 0)
HwndTaskList = FindWindowEx_(HwndTask, 0, "MSTaskListWClass", 0)
Repeat
Delay(10)
If GetAsyncKeyState_(#VK_LBUTTON)
GetCursorPos_(@point.POINT)
HandleHover = WindowFromPoint_(Point\X | (Point\Y << 32))
If HandleHover = HwndTaskList And Not Passage
Passage + 1
Debug "TaskBar handle ''" + HwndTaskList + "'' is cliqued !!"
EndIf
Else
Passage = 0
EndIf
Until GetAsyncKeyState_(#VK_ESCAPE)Because with my cow pat code, i just can detect the click or double-click, but not the hwnd or title of icon clicked
Perhap it exist a more serious way for see if an application is minimized in the taskbar, and restored from the taskbar
I have searched all yesterday and not found something like that
And also it's perhaps a way if i can list all the icons in the taskbar, with a loop for see if it change ?
The happiness is a road...Not a destination
Re: Detect TaskBar events
WM_ACTIVATE. These are the events of minimizing and maximizing a window. I don't know how to apply this to a third-party process.Kwai chang caine wrote: Tue Apr 16, 2024 9:06 am Perhap it exist a more serious way for see if an application is minimized in the taskbar, and restored from the taskbar
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Detect TaskBar events
Hello AZJIO
Your code is for monitoring the minimze and restore, etc .. of a personal PB window by his CallBack
Me i search to monitoring all the windows and applications iconized in the taskbar
A style of hook of the TaskBar, for receive a message when something happened and have an event (An icon is adding, removing, a click is made, etc....)
It's clearly above my poor level, only a MASTER can found this style of code
It's surprising nobody need that a day
There are hooks of nearly all in the forums (Mouse, Keyboard, Explorer, etc ..) and nothing on the TaskBar...
So thanks when even for your kind help
Have a good day AZJIO
Your code is for monitoring the minimze and restore, etc .. of a personal PB window by his CallBack
Me i search to monitoring all the windows and applications iconized in the taskbar
A style of hook of the TaskBar, for receive a message when something happened and have an event (An icon is adding, removing, a click is made, etc....)
It's clearly above my poor level, only a MASTER can found this style of code
It's surprising nobody need that a day
There are hooks of nearly all in the forums (Mouse, Keyboard, Explorer, etc ..) and nothing on the TaskBar...
So thanks when even for your kind help
Have a good day AZJIO
The happiness is a road...Not a destination
Re: Detect TaskBar events
That's why I thought that events from windows also go through some kind of filter
SetWindowsHookEx + WH_CALLWNDPROC ?
SetWindowsHookEx + WH_SHELL + HSHELL_ACTIVATESHELLWINDOW, HSHELL_GETMINRECT, HSHELL_WINDOWACTIVATED ?
SetWindowsHookEx + CBTProc + HCBT_ACTIVATE ?
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Detect TaskBar events
I don't know anything about it, but I don't think there could be a hook for all Windows events, there are so many.
Coding this kind of rocket and again if it's possible, the day I'll know to do that, I change my nickname from "Kwai chang caine"
to "Master PO"
and i open a big temple "FREDolin"

Coding this kind of rocket and again if it's possible, the day I'll know to do that, I change my nickname from "Kwai chang caine"
to "Master PO"

and i open a big temple "FREDolin"

The happiness is a road...Not a destination
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Detect TaskBar events
Too strong AZJIO you have found what i search since yesterday
I have try it, and i'm not sure that works perfectly, the debug write sometime the oposite of the state
But it's when even a start
One thousand of thanks for your precious help
Have a very good end of the day
I have try it, and i'm not sure that works perfectly, the debug write sometime the oposite of the state
But it's when even a start
One thousand of thanks for your precious help
Have a very good end of the day
The happiness is a road...Not a destination
