Private Declare Function GetWindowLongA& Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long)
Private Declare Function SetWindowLongA& Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long)
Private Declare Function FindWindowA& Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String)
Dim T$, n As Byte
Private Sub UserForm_Initialize()
T = " ni les épines ..."
cache
End Sub
Private Sub C2_Click()
n = n + 1
Me.Caption = Me.Caption & T
cache
T = " encore moins les soucis ...": C2.Caption = " ... encore une fois"
C2.Visible = n < 2
End Sub
Sub cache()
Dim hWnd As Long
hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _
"X", "D") & "Frame", Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF
End Sub
Private Sub C1_Click()
Unload Me
End Sub