Results 1 to 3 of 3

Thread: Move form without Titlebar. no API needed

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    10

    Move form without Titlebar. no API needed

    Easily move form without using titlebar(border style=0) or you can click anywhere on the form to move it!!!.

    Code:
    Dim xx As Single
    Dim yy As Single
    Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        xx = X
        yy = Y
    End Sub
    
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then
            With Me
                .Left = .Left - (xx - X)
                .Top = .Top - (yy - Y)
            End With
        End If
    End Sub
    I found no drawbacks. Do you see anythig? .Please tell me
    Attached Files Attached Files

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