VBForums >
Visual Basic >
API > Hillo?Can anyone tell me how can I drag Picture2 in Picture2(Picture2 is the holder o
Click to See Complete Forum and Search --> : Hillo?Can anyone tell me how can I drag Picture2 in Picture2(Picture2 is the holder o
iProgram
Sep 19th, 2000, 07:52 AM
I wanna make a process bar just as Winamp.But I can realize it.
kb244
Sep 19th, 2000, 09:01 AM
Realize it?
What do you mean by "process bar"?
iProgram
Sep 19th, 2000, 10:49 PM
I means that I wanna make a scroll bar just like Winamp,etc.
But a can't drag the bar to move.
I wanna know how to drag one picture box in another picture box when running.
Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
'First add two pictureboxes. DON'T change names, and picture1 larger than Picture2
Picture2.Top = Y
Picture2.Left = X
If Source = Picture2 Then
Set Picture2.Container = Picture1
Picture2.Top = 0
Picture2.Left = 0
End If
End Sub
Now run and drag the second picbox inside the first. It should go in.
You should be able to figure out the code or tell me and I'll explain:).
Oh, and you didn't explain that clearly enough.
[Edited by Escaflowne on 09-21-2000 at 11:55 PM]
iProgram
Sep 20th, 2000, 03:44 AM
I find a control named Slider in Microsoft Windows Common Controls 6.0 and it doesn't look well.I wanna make my own Slider control instead.But I can't drag object(Picture1).5~~~~~~~~~~~~~
That is my trouble.
Really, megatron, but what if the second picturebox is dragged OUTSIDE the first? You should also add:
Picture2.Container = Picture1
Actually not. That's only needed if you want to set the container at runtime. If you manually draw Picture1 inside Picture2 (at design time) you do not need that line.
Oops, excuse me about that.
I am, after all, a human being, and humans make mistakes, so it is natural that I make some, too.
If a person dragged the picbox2 OUTSIDE picbox1, it would make it invisible ([=======]=O).
And also, if you've moved your mouse super-fast, you would actually not trigger the mousemove event and the picture box would stop (instead of going to the very top/bottom).
I'll provide a code once I look through this pile of 91 forum responses.
What do you mean by moving a mouse "super-fast". To us (humans) what's fast is the speed of snails for computers.
Well, actually, it means that if you drag fast over a small picturebox, it would trigger the FORM's MouseMove Event because the mouse is already outside.
The clearer way is that when you have a 3-pixel picbox, it's not natural for a user to take 40 secs to move 120 pixels, so that may be a problem. You should add the same thing in PICTUREBOX2_Mousemove and (Add to Form_Mousemove a code that moves the picbox2 to a edge of picbox1).
iProgram
Sep 26th, 2000, 11:53 PM
Megatron's answer settled my question.
Thank you all.
Thanks Megatron.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.