VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Drag Away

by Compudyne 2o0`1 (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

To Drag A Form Without Using The Annoying Blue Bar

Assumes
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

Rate Drag Away

'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

Download this snippet    Add to My Saved Code

Drag Away Comments

No comments have been posted about Drag Away. Why not be the first to post a comment about Drag Away.

Post your comment

Subject:
Message:
0/1000 characters