Results 1 to 4 of 4

Thread: Move textbox?

  1. #1

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179

    Wink

    Hi
    How do you move a textbox with a mouse during runtime?

    Any suggestion or help will be greatly appreciated

  2. #2
    Member
    Join Date
    Oct 2000
    Posts
    35
    Try the drag-method
    rfo

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>



    Code:
    'Allowing a form control to be movable (DRAG AND DROP)
    '...ie textbox
    Option Explicit
    
    Public globalX As Integer
    Public globalY As Integer
    
    Private Sub Form_DragDrop(Source As Control, X As _
    Single, Y As Single)
        Text1.Move X - globalX, Y - globalY
    End Sub
    
    Private Sub TExt1_MouseDown(Button As Integer, _
    Shift As Integer, X As Single, Y As Single)
        Text1.Drag vbBeginDrag
        globalX = X
        globalY = Y
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Thanks a lot guys!!!!!
    Thats just what i am looking for

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