bonjour Gardian, sabV
ou juste pour enlever la croix sans la barre de titres
une chose IMPORTANTE ne pas publier le bouton EXIT
en tête de module
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 Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim hwnd As Long
hwnd = FindWindow(vbNullString, Me.Caption)
Style = GetWindowLong(hwnd, -16) And Not &HC00000
SetWindowLong hwnd, -16, Style
DrawMenuBar hwnd
End Sub