Bonjour
comment allez vous ? bien j'espere
j'ai ce code ci qui devrait normalement me permettre de reduire et agrandir mon userform mais qui ne marche pas
MErci de bien vouloir m'aider a avancer dans mon projet
comment allez vous ? bien j'espere
j'ai ce code ci qui devrait normalement me permettre de reduire et agrandir mon userform mais qui ne marche pas
Code:
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()
Dim hwnd As Long
hwnd = FindWindow(vbNullString, Me.Caption)
wLong = GetWindowLongA(hwnd, GWL_STYLE) Or WS_SIZEBOX Or WS_TROIS_BOUTON
SetWindowLong hwnd, GWL_STYLE, wLong
End Sub
MErci de bien vouloir m'aider a avancer dans mon projet