P
petchy
Guest
Le Forum
voila j'ai trouvé se code sur un autre site pour enlever la croix sur un USF mais ça ne fonctionne pas,pouvez vous me dire ce qui ne va pas.
Private Declare Function SetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Sub UserForm_Initialize()
Dim hWnd As Long
'''''''''''initialisation des controles
'enlève la croix
hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _
"X", "D") & "Frame", Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF
End Sub
voila j'ai trouvé se code sur un autre site pour enlever la croix sur un USF mais ça ne fonctionne pas,pouvez vous me dire ce qui ne va pas.
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Sub UserForm_Initialize()
Dim hWnd As Long
'''''''''''initialisation des controles
'enlève la croix
hWnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", _
"X", "D") & "Frame", Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF
End Sub