Finding Toolbar Button Currently Under the Mouse 
Author Message
 Finding Toolbar Button Currently Under the Mouse

Hi there..

Can anyone please tell me how to find which button of the toolbar is under
the mouse when the mouse moves over a toolbar. I am using flat style toolbar
and I tried using SendMessage with TB_HITTEST and TB_GETHOTITEM in the
mousemove event! But I didn't get any result!!! Please help me!

VNM



Mon, 25 Feb 2002 03:00:00 GMT  
 Finding Toolbar Button Currently Under the Mouse

thoughts were released on Thu, 9 Sep 1999 18:07:38 +0530 bearing
the following fruit:

Quote:
>Hi there..

>Can anyone please tell me how to find which button of the toolbar is under
>the mouse when the mouse moves over a toolbar. I am using flat style toolbar
>and I tried using SendMessage with TB_HITTEST and TB_GETHOTITEM in the
>mousemove event! But I didn't get any result!!! Please help me!

Use the mouse move event of the toolbar, you can then calculate
which button you are over.

Regards,

Drac



Mon, 25 Feb 2002 03:00:00 GMT  
 Finding Toolbar Button Currently Under the Mouse
On Thu, 9 Sep 1999 18:07:38 +0530, "infoSTACK"

Hi,
  hmmmm. Is this a simple toolbar? I.E. non-customiseable? If that's
so, why not some like:

  select case button.tooltiptext
  case "tip for button 1"
       ...you're over button 1
  case "tip for button 2"
       ...you're over button 2
 end select

etc etc etc?

also, you might get more mileage out of a predefined hash of your
tooltips. That would give you a numeric key and the text for complex
toolbars, pluse give you a neat way of identifying the button.

hope this helps.

Cheers
Jon Korty

Quote:
>Hi there..

>Can anyone please tell me how to find which button of the toolbar is under
>the mouse when the mouse moves over a toolbar. I am using flat style toolbar
>and I tried using SendMessage with TB_HITTEST and TB_GETHOTITEM in the
>mousemove event! But I didn't get any result!!! Please help me!

>VNM



Mon, 25 Feb 2002 03:00:00 GMT  
 Finding Toolbar Button Currently Under the Mouse
May I ask why you need this? The new toolbar included with VB6 has the flat
style and will automatically raise the icons when the mouse passes over
them.

If you are needing this functionality to emulate the latest MS toolbars, I
highly recommend using the "CoolBar" in vb6.

Craig S.

Quote:

>Hi there..

>Can anyone please tell me how to find which button of the toolbar is under
>the mouse when the mouse moves over a toolbar. I am using flat style
toolbar
>and I tried using SendMessage with TB_HITTEST and TB_GETHOTITEM in the
>mousemove event! But I didn't get any result!!! Please help me!

>VNM



Tue, 26 Feb 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Find which toolbar button is currently under the mouse

2. Find which toolbar button is currently under the mouse

3. Mouse moveover toolbar popout buttons

4. Mouse moveover toolbar popout buttons

5. Simultaneously pressing a key and mouse-clicking a button on a toolbar

6. Mouse-clicking a button on the toolbar whilst holding down the Shift key

7. Mouse moveover toolbar popout buttons

8. Toolbar, mouse over which button?

9. Find out if button is pressed on a Word toolbar

10. BUG: Toolbar-Buttons wrong pictures - toolbar.zip (1/1)

11. BUG: Toolbar-Buttons wrong pictures - toolbar.zip (0/1)

12. Changing Toolbar Button Properties Outside of the Toolbar

 

 
Powered by phpBB® Forum Software