Search Tools Links Login

Drag form without titlebar

Visual Basic 6, or VB Classic

Drag a form that has no titlebar! Add the routine listed below, and call it in the 'MouseDown' event of the form (or a control on the form): MoveWindow Me.Hwnd

Original Author: Kamilche

API Declarations

Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long


Public Sub MoveWindow(TheHwnd As Long)
  'Drag the form with the mouse
  SendMessage TheHwnd, &HA1, 2, 0&
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 80 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.