cs_EBArtSoft
Messages postés4525Date d'inscriptiondimanche 29 septembre 2002StatutModérateurDernière intervention22 avril 20199 2 déc. 2003 à 17:43
Voici unemothode pour modifier la taille d'un control
de maniere dynamique :
(ex. avec un commandbutton)
Option Explicit
Private Moving As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Moving = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
If Moving Then
Command1.Width = X - Command1.Left
Command1.Height = Y - Command1.Top
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Moving = False
End Sub