- Visual Basic / VB.NET : Redimensionner un fond d'ecran de form mdi - CodeS SourceS
- Fond d ecran dans une form !
- Visual Basic / VB.NET : Changer le fond d'écran - CodeS SourceS
- Visual Basic / VB.NET : Mfe : modificateur de fond d'ecran automatique - CodeS SourceS
- Modification du papier peint/fond d'écran du bureau
En exclusivité, voici mon code pour redimmentionner proportionnellement tous les objets d'une form quand on change sa taille :
'Code de Florent.
'Si vous ajoutez ce code dans un de vos programmes, citez-moi.
Option Explicit
Dim OldWidth As Integer
Dim OldHeight As Integer
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