Login Register


Silver [Code Sample]: Moveable Controls filter_list
Author
Message
[Code Sample]: Moveable Controls #1
This code will allow the user to move any controls linked to this code

Preview:
[Image: move-obj.gif]

Sample:
Code:
Dim X, Y, point     Private Sub %ControlName%_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles %ControlName%.MouseMove         If e.Button = MouseButtons.Left Then             point = Control.MousePosition             point.X = Me.point.X - Me.X             point.Y = Me.point.Y - Me.Y             sender.Location = point         End If     End Sub     Private Sub %ControlName%_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles %ControlName%.MouseDown         X = Control.MousePosition.X - sender.Location.X         Y = Control.MousePosition.Y - sender.Location.Y     End Sub
RIP the pizza king
[Image: 3.0]

all of my contact info is on my Github Profile

Reply

RE: [Code Sample]: Moveable Controls #2
The only thing VB has going for it is the basic syntax if you grew on it so it has a sorta nostalgic value ("muh goto").

Reply







Users browsing this thread: 1 Guest(s)