Results 1 to 13 of 13

Thread: Hillo?Can anyone tell me how can I drag Picture2 in Picture2(Picture2 is the holder o

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Location
    China
    Posts
    25

    Unhappy

    I wanna make a process bar just as Winamp.But I can realize it.

  2. #2
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    Realize it?
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  3. #3
    Guest
    What do you mean by "process bar"?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Location
    China
    Posts
    25

    Unhappy Sorry, My English is poor..

    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.

  5. #5
    Guest
    Code:
    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.

  6. #6
    Guest
    Oh, and you didn't explain that clearly enough.

    [Edited by Escaflowne on 09-21-2000 at 11:55 PM]

  7. #7

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Location
    China
    Posts
    25

    Unhappy Think you all and sorry for my poor English again.

    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.

  8. #8
    Guest
    Really, megatron, but what if the second picturebox is dragged OUTSIDE the first? You should also add:

    Code:
    Picture2.Container = Picture1

  9. #9
    Guest
    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.

  10. #10
    Guest
    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.

  11. #11
    Guest
    What do you mean by moving a mouse "super-fast". To us (humans) what's fast is the speed of snails for computers.

  12. #12
    Guest
    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).

  13. #13

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Location
    China
    Posts
    25

    Talking My question has been settled

    Megatron's answer settled my question.
    Thank you all.
    Thanks Megatron.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width