finding my window's taskbar button 
Author Message
 finding my window's taskbar button

Hi everyone,

Does anyone know of a VB6 way of finding the top and left values of my
current window's taskbar button when minimised? I've got height and
width OK, and I want to write graphics to (on top of?) my taskbar
button when my app is minimised.

I don't mind using the API, but GetWindowPlacement returns
ptMinposition x=3000, y=3000 which clearly is not the real position.

Paul Smith
Clever Software
Scotland, UK
------------
please remove "XYZ" to reply by email



Mon, 18 Nov 2002 03:00:00 GMT  
 finding my window's taskbar button
Paul,

Quote:
>Does anyone know of a VB6 way of finding the top and left values of my
>current window's taskbar button when minimised?

One way or another you'd have to inject code in the Shell process
space, and then use the Toolbar API to get that information. Because
the taskbar buttons are actually buttons in a Toolbar control.

The easiest way to get code to execute in the shell process is
probably to put it in an COM component, and then call the SHLoadInProc
API. Then you'd have to use some IPC mechanism to get the information
back to your app.

The problem is that on some Windows versions (I don't know if it's the
same on all), the Toolbar buttons are ownerdrawn, and you can probably
not get the button text with a TB_GETBUTTONTEXT message. So I don't
know how you can determine exactly which button belongs to your
window. Maybe the lParam member of the TBBUTTONINFO structure contains
something interesting, like the window handle.

Mattias

____________________________________________

    http://hem.spray.se/mattias.sjogren/



Mon, 18 Nov 2002 03:00:00 GMT  
 finding my window's taskbar button
Hi Mattias,

On Thu, 01 Jun 2000 13:32:40 GMT,

Quote:

>>Does anyone know of a VB6 way of finding the top and left values of my
>>current window's taskbar button when minimised?
>One way or another you'd have to inject code in the Shell process
>space, and then use the Toolbar API to get that information. Because
>the taskbar buttons are actually buttons in a Toolbar control.
>The easiest way to get code to execute in the shell process is
>probably to put it in an COM component, and then call the SHLoadInProc
>API. Then you'd have to use some IPC mechanism to get the information
>back to your app.
>The problem is that on some Windows versions (I don't know if it's the
>same on all), the Toolbar buttons are ownerdrawn, and you can probably
>not get the button text with a TB_GETBUTTONTEXT message. So I don't
>know how you can determine exactly which button belongs to your
>window. Maybe the lParam member of the TBBUTTONINFO structure contains
>something interesting, like the window handle.

Thanks a lot for the pointers. (I confess I don't have a clue what
you're on about, but then what's the documentation for? :-)

I'll starting digging in the ground you've marked out for me.

Wish me luck!

Paul Smith
Clever Software
Scotland, UK
------------
please remove "XYZ" to reply by email



Mon, 18 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. form button in window's taskbar

2. Can't find button event in property window

3. Is it under Windows 95/NT4.0 also possible to flash only the taskbar button

4. Taskbar buttons on other exe's

5. Create window Buttons in taskbar (runtime)

6. Hiding Windows Taskbar or Disabling Start button

7. Killing an App with no window or taskbar button

8. "finding" my window's taskbar button

9. Maximize window to Taskbar's edge

10. A VB form doesn't appear in Windows taskbar

11. 'Restore Window' button on maximized Form

12. Finding out if the WebBrowser's Back button is enabled

 

 
Powered by phpBB® Forum Software