#If Win64 Then
Public Declare PtrSafe Function SetWindowLongA Lib "user32" Alias "SetWindowLongptrA" (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr
Public Declare PtrSafe Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
#Else
Public Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#End If
Sub NoTitleBar(form)
#If Win64 Then
Dim hwnd As LongPtr
#Else
Dim hwnd As Long
#End If
Dim W#, H#, EcX#
With form
EcX = .Width - .InsideWidth
W = .InsideWidth
H = .InsideHeight
hwnd = FindWindowA(vbNullString, form.Caption)
SetWindowLongA hwnd, -16, &H94080080 'on retire la barre de titre
.Move .Left, .Top, W, H + EcX
End With
End Sub