question

SindhuH-2474 avatar image
0 Votes"
SindhuH-2474 asked SindhuH-2474 commented

Action on Mouse Hovering is not displayed due to Tool tip

Hello,



I am coding in Windows Forms and have inserted an image using PictureBox, and on mouse hovering, I am changing the image to a GIF.
Now I also need to add ToolTip on Mouse Hover.

The problem that I am facing now is that when I hover over the image, the tooltip is activated, but the cursor pointer is slightly on the edge of the tooltip and hence the GIF is not displaying, since "technically it's not hovering on the image".

Hence, can you please help me find a solution in locating the tooltip slightly away from the mouse pointer, such that the GIF is visible and the tool tip too!

Thank you in advance!

windows-forms
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

132327-tooltip-overlapping-on-mouse-cursor.png



In the above image, tooltip's message has been displayed programmatically.
Attaching the code:

Private Sub Image1_MouseHover(sender As Object, e As EventArgs) Handles Image1.MouseHover
ToolTip1.ToolTipTitle = "MouseHover"
ToolTip1.Show("Mouse is hovering", Image1)
End Sub

0 Votes 0 ·

132359-tooltip-using-properties-box.png



In the above image, the tooltip message has been displayed using properties window.
And its perfect, but the issue is it is same for every image in the picturebox.

And i need to change the tooltip message for every picture. But through program, the tooltip co-incides with the image when i hover on the image, and my mouse_hover Sub doesn't work since the mouse pointer tip is slightly on the edge of the tooltip
I

0 Votes 0 ·

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered SindhuH-2474 commented

It can work with native Win32 Tooltip ("tooltips_class32") :

132289-tooltip-win32.gif




tooltip-win32.gif (180.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you soo much!

0 Votes 0 ·