1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Public Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "User32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "User32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Public Const GWL_STYLE As Long = (-16) 'The offset of a window's style
Public iStyle As Long As Long
Public hWnd As Long
public maform as object
Sub caption_complete()
hWnd = FindWindow(vbNullString, maform.Caption) 'le handle de la form
iStyle = GetWindowLong(hWnd, GWL_STYLE) Or &H70000 'trouve le style du system menu et on ajoute les bouton mimimise et maximise
SetWindowLong hWnd, GWL_STYLE, iStyle 'applique le nouveau style
End Sub |
Partager