Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help...Mouse Click to make image visible

Status
Not open for further replies.

spyder

Technical User
Jan 10, 2001
21
0
0
US
I am creating the "Memory Matching Game"... I show a bunch of pictures and then take them away and see if you can remember where they are...I want the user to be able to click over where the picture once was, and for it to become visible again. My Mouse Click procedure won't work. Please give me a suggestion.
 
Why don't you get the location of the click from the form? Try: [tt]
Private Sub Form_MouseDown _
(Button As Integer, _
Shift As Integer, _
X As Single, _
Y As Single)
With Image1
If X >= .Left Then
If X <= .Left + .Width Then
If Y >= .Top Then
If Y <= .Top + .Height Then
MsgBox &quot;You clicked Image1.&quot;
End If
End If
End If
End If
End With
End Sub
[/tt]


VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top