Move Object Frame Using Mouse

diannosd

Registered User.
Local time
Today, 10:00
Joined
Feb 14, 2008
Messages
11
Hi,

I am trying to be clever with an object on my form. It is a picture of a van and its position is determined by a field called status;

I have done this by using

Me.Brady_Van.Top = 2438.1

Code:
Select Case (Me.Status)
Case 1
    Me.Brady_Van.Left = 340.2
Case 2
    Me.Brady_Van.Left = 1927.8
Case 3
    Me.Brady_Van.Left = 3214.89
Case Else
    Me.Brady_Van.Left = 340.2
End Select

What I would like to do, is be able to hover over the object and when for example the left mouse button is pressed move the van left or right. i.e. Add 1 to Status. Is this possible.
 
Yes it is. However it is a combination of events you have to program.
When hovering over an object, the MouseOver event is fired. The other event you have to check is the mousedown event. you need to know which button is clicked.
Use the move method of the object to move the object around.

You could post the result in the sample databases part of the forum.:D

Enjoy!
 

Users who are viewing this thread

Back
Top Bottom