Login Register



phyrrus9, 1996-2021. Rest in Peace.


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
*schlattwalks to .NET app*

[Image: watersheep.gif]
misonothx.rocks
github account

Support @Crimin4L via his website CTRLHub.co & Anon.City !

sinister.ly <3

Reply







Users browsing this thread: 1 Guest(s)