PDA

View Full Version : Image Popup when mouse arrow is on Button



ravinder_tig
10-05-2009, 09:19 PM
Hi Guys

I'm Quite new to VBA Programming n working on a project facing one Obstacle regarding that

I don't have any problem regrading the project but my Problem starts when i tried to make my tool more user friendly

i tried to put comments on conditional cells in form of images but i also want to put these Image POPUPS on buttone also what i desired is when ever mose arrow hover over a button a image pop should appear

i' tried to google it but of no use

I'd be highly indebted if any one could please help me regarding this problem i'm attaching a dummy file for better under standing

Thanks a Lot

Regards
Ravinder Singh

garydp
10-06-2009, 12:57 AM
just a suggestion and probably not the best i have used in the past

Private Sub Commandbutton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

If X > 1 And X < 88 And Y > 1 And Y < 23 Then
Image1.Visible = True
Else
Image1.Visible = False
End If

End Sub

the numbers corrispond to the width and height of my command button. when they are within the limits its visible and outside not visible. obviously i had set the image to not visible to begin with.

Bob Phillips
10-06-2009, 01:23 AM
Is it forms buttons or control toolbox?

ravinder_tig
10-06-2009, 02:37 AM
thanks a lot its a gud solution but what i had in mind was to use different events like Set Focus and lost Focus Could u please help me in that

Regards,
Ravinder Singh