Click and Drag Anywhere
Post your questions regarding programming in Visual Basic 6 in here.
1 post
Page 1 of 1
ok well I'm new to Visual basic 6, however I'm not using VB 6. I'm actually using a program that's similar to VB 6 called Jabaco. Anyway I created a custom GUI, and I already got the rollovers, minimize, maximize, etc: however I wanna be able to click anywhere on the program, and drag it anywhere on my desktop.
I know in VB 2008 I can use
I know in VB 2008 I can use
Code: Select all
However I have no idea how I can do this using a vb6 code for jabaco. SO if anyone can help me out this will be great.#Region " Global Variables "
Dim Point As New System.Drawing.Point()
Dim X, Y As Integer
#End Region
#Region " GUI "
Private Sub Main_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (X)
Point.Y = Point.Y - (Y)
Me.Location = Point
End If
End Sub
Private Sub Main_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
X = Control.MousePosition.X - Me.Location.X
Y = Control.MousePosition.Y - Me.Location.Y
End Sub
#End Region
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023