|
-
Dec 19th, 1999, 03:41 AM
#1
Thread Starter
New Member
I have a form with a large picturebox all over it. on this
picturebox I have a small image that the user move around the
picture clicking with the mouse. now I want to add more
pictureboxes onto the big picturebox. But the image may not move
under/above/through these new pictureboxes. I want the igae to
stop at the pictures or move around them.
-
Dec 21st, 1999, 05:16 AM
#2
you can do this by using the BitBlt function in the Kernel or User API (I forget which), and using a type or two. Once you have figured out how to have the BitBlt method re-paint the image, check the image types. Here's example code on the types:
Public Type ImageToMove
Left as Long
Width as Long
Top as Long
Height as Long
End Type
Public Type ImageToStay
Left as Long
Width as Long
Top as Long
Height as Long
End Type
now create your vaiables:
Dim MyMovingImage as ImageToMove
Dim MyStationaryImage as ImageToStay
and to compare them:
If MyMovingImage.Left > MyStationaryImage.Width And MyMovingImage.Top > MyStationaryImage.Height Then
'Not on the stationary image
ElseIf MyMovingImage.Left < MyStationaryImage.Left And MyMovingImage.Top < MyStationaryImage.Top Then
'Not on the stationary image (maybe)
Else
'Definately on the stationary image
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|