|
-
Jan 8th, 2000, 08:16 AM
#1
Thread Starter
Hyperactive Member
English:
I want that I can move a picture (which is bigger than the screen) by pressing the right mouse-button and moving the mouse.
Is this possible ?
(VB 3, but normally this doesn't matter. I've also VB6, but for this Program I Use VB3)
Deutsch:
Ich möchte, daß ich ein Bild, das größer als der Bildschirm ist, mit der rechten Maustaste bewegen kann (wie in "Die Sidler"). Ist das möglich in VB3 ?
-
Jan 8th, 2000, 02:34 PM
#2
Hyperactive Member
Well I would answer you in Deutsch, but I've only learned 2 years worth, and I don't think that's enough for me to form a coherent sentence for you 
Well, there's several ways about doing this.
1.) You could just have a picturebox within a picturebox that moves around.
2.) You could use the paintpicture method to recursivly redraw the picture to the new coordinates.
3. Faster than 2, but same idea, use bitblt to move redraw the picture.
Well, no matter how you do it, you're going to be using a picturebox's mousemove event.
It should be something like this:
If button = 2 Then
Picture1.PaintPicture Picture1.Picture, X, Y
End If
You'll have to do that math to prevent the picture from being drawn so that it might not fill the picturebox completely (What I mean is, if I dragged the upper-left corner of the picture down to the bottom-right corner, this shouldn't be allowed because then you'd see the blank back of the picture box.)
I hope this helps. Guten Tag!
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
|