Private Sub Form_Resize() On Error Goto Erreur dim XCoeff .... .... .... Erreur: OldWidth = Width OldHeight = Height End Sub--Capoueidiablo--
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPublic oldWidth As Long Public oldHeight As Long Private Sub Form_Load() oldWidth = Width oldHeight = Height End Sub Private Sub Form_Resize() On Error Resume Next Dim XCoeff As Single Dim YCoeff As Single Dim Controle As Control XCoeff = Width / oldWidth YCoeff = Height / oldHeight For Each Controle In Me Controle.Move Controle.Left * XCoeff, Controle.Top * YCoeff, Controle.Width * XCoeff, Controle.Height * YCoeff Next oldWidth = Width oldHeight = Height End Sub