Option Explicit
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (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
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Const GWL_STYLE As Long = (-16) 'The offset of a window's style
Private Const WS_MINIMIZEBOX = &H20000 'Style to add a Minimize box on the title bar
Private Const WS_CAPTION As Long = &HC00000 'Style to add a titlebar
Private Const SW_MAXIMIZE = 3 'constantes pour la fonction
Private Const SW_MINIMIZE As Long = 6 'ShowWindow
Private hwnd As Long, Style As Long
Private wInit As Long, hInit As Long 'ses dimensions d'origine
Private FormInit As Boolean 'définit l'étape d'initialisation de la form