Yves Béchard
XLDnaute Nouveau
Bonjour a tous
Comment faire pour minimisez et maximisez un userform
Merci
Comment faire pour minimisez et maximisez un userform
Merci
Option Explicit
#If VBA7 Then
Private Declare ptrsafe Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Longptr
Private Declare ptrsafe Function SetWindowLongA Lib "user32" (ByVal hwnd As Longptr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Longptr
Dim handle As longptr
#Else
Private Declare Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Dim handle As Long
#End If
Private Sub UserForm_Activate()
handle = fwa(vbNullString, Me.Caption)
SetWindowLongA handle, -16, &H94CF0080 'complete caption
End Sub
re
on ajoute donc les boutons manquants dans la caption du UserForm
dans le module du Userform
VB:Option Explicit #If VBA7 Then Private Declare ptrsafe Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Longptr Private Declare ptrsafe Function SetWindowLongA Lib "user32" (ByVal hwnd As Longptr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Longptr Dim handle As longptr #Else Private Declare Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Dim handle As Long #End If Private Sub UserForm_Activate() handle = fwa(vbNullString, Me.Caption) SetWindowLongA handle, -16, &H94CF0080 'complete caption End Sub
re
on ajoute donc les boutons manquants dans la caption du UserForm
dans le module du Userform
VB:Option Explicit #If VBA7 Then Private Declare ptrsafe Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Longptr Private Declare ptrsafe Function SetWindowLongA Lib "user32" (ByVal hwnd As Longptr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Longptr Dim handle As longptr #Else Private Declare Function fwa Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Dim handle As Long #End If Private Sub UserForm_Activate() handle = fwa(vbNullString, Me.Caption) SetWindowLongA handle, -16, &H94CF0080 'complete caption End Sub
re
ben moi aussi je pige pas
le mot de passe?
mon code n'y est pas (dans aucun de tes userforms???
je l'ai modifié et mis a tous tes userforms
ca fonctionne en 32 bits
Regarde la pièce jointe 1039590