Salut Didier,
Tu mets ca dans le code de ton UserForm :
Dim obj As Object
Option Explicit
Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function EnableWindow Lib "User32" _
(ByVal hWnd As Long, ByVal bEnable As Long) As Long
Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Sub UserForm_Activate()
EnableWindow FindWindowA("XLMAIN", Application.Caption), 1
End Sub
Private Sub UserForm_initialize()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) Or &H20000
End Sub
Ce n'est pas de moi (désolé pour l'auteur dont g oublié le nom...pas bien ca!!), et ca marche très bien chez moi...
L'avantage ici C que tu peux même réduire la fenetre si elle gene!! Comme n'importe quelle appli Windows.
@+, Ben