Results 1 to 3 of 3

Thread: Move Form With Custom Titlbar [RESOLVED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    USA
    Posts
    75

    Question Move Form With Custom Titlbar [RESOLVED]

    Im using a borderless form with a label as a title bar with 3 command buttons (Min,Max,Close) I was wondering how to move the form when the user clicks on the titlebar and drags it
    Last edited by Limpster; Jul 4th, 2003 at 11:36 AM.

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089
    lblTitleBar = name of the label being used as titlebar
    VB Code:
    1. Private Sub lblTitleBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     Dim lngReturnValue As Long
    3.     If Button = 1 Then
    4.         Call ReleaseCapture
    5.         lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
    6.     End If
    7. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    USA
    Posts
    75

    Thanks!

    I got it to work! Thanks alot!

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