Search Tools Links Login

Drag Away


To Drag A Form Without Using The Annoying Blue Bar

Original Author: Compudyne 2o0`1

Assumptions

No need To Know Anything Sept This Will Save You Alot Of Time

Side Effects

No Side Effects

API Declarations

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
Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2

Code

'Make A New Form
'Copy And Past this In the Main Code Area For
'Form
Private Sub Form_Load()
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
  Call ReleaseCapture
  lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
'And Werk Like You would Always Werk Then
'Press
'Play And Dag It From The
'Main body Of the Form
'Instead Of the Blue Bar

About this post

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

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.