Créer un bouton Réduire dans un Userform

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

TheProdigy

XLDnaute Impliqué
Bonjour tout le monde,

Existe il un moyen (Code VBA) pour créer un bouton Réduire userform.
Prière de m donner un exemple s'il existe ou seulement m'expliquer car je suis un débutant.

Merci à tous.
 
Re : Créer un bouton Réduire dans un Userform

J'ai essayé mais ça ne marche pas. Est-ce parce que j'ai Excel 2007?
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim wLong As Long
Const GWL_STYLE = (-16), GWL_EXSTYLE = (-20), WS_SIZEBOX = &H40000, WS_TROIS_BOUTON = &H70000, WS_EX_APPWINDOW = &H40000
Private Sub UserForm_Initialize()
hwnd = FindWindow(vbNullString, Me.Caption)
wLong = GetWindowLongA(hwnd, GWL_STYLE) Or WS_SIZEBOX Or WS_TROIS_BOUTON
SetWindowLong hwnd, GWL_STYLE, wLong
End Sub
 

Pièces jointes

  • Objet introuvable.jpg
    Objet introuvable.jpg
    49.2 KB · Affichages: 345
  • Projet introuvable.jpg
    Projet introuvable.jpg
    49.2 KB · Affichages: 193
Dernière édition:
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

  • Question Question
Microsoft 365 affichage userform
Réponses
4
Affichages
520
Retour