Bonjour
Je cherche à savoir comment faire ce qui permettrait de bouger une Form qui n'a pas de bordure.
Merci de votre aide par avance
EDIT: C'est bon j'ai trouver pour ceux qui cherche il faut placer ce code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 Public Class Form1 Dim doDrag As Boolean Dim x As Integer Dim y As Integer Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown doDrag = True x = Windows.Forms.Cursor.Position.X - Me.Left y = Windows.Forms.Cursor.Position.Y - Me.Top End Sub Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove If doDrag Then Me.Top = Windows.Forms.Cursor.Position.Y - y Me.Left = Windows.Forms.Cursor.Position.X - x End If End Sub Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp doDrag = False End Sub End Class
Partager