In response to a wash out in another thread (that's been closed) this should solve your problem:

VB Code:
  1. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
  2. Private Declare Function GetForegroundWindow Lib "user32" () As Long
  3. Private Declare Function AttachThreadInput Lib "user32" (ByVal idAttach As Long, ByVal idAttachTo As Long, ByVal fAttach As Long) As Long
  4. Private Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As Long) As Long
  5.  
  6. Public Sub ForceWindowToTop(hWnd As Long)
  7.    
  8.     Dim lMyPId As Long
  9.     Dim lCurPId As Long
  10.    
  11.     lMyPId = GetWindowThreadProcessId(hWnd, 0)
  12.     lCurPId = GetWindowThreadProcessId(GetForegroundWindow(), 0)
  13.    
  14.     If Not (lMyPId = lCurPId) Then
  15.         AttachThreadInput lCurPId, lMyPId, True
  16.         SetForegroundWindow hWnd
  17.         AttachThreadInput lCurPId, lMyPId, False
  18.     End If
  19.    
  20.     If Not (GetForegroundWindow() = hWnd) Then
  21.         SetForegroundWindow hWnd
  22.     End If
  23.    
  24. End Sub

NEVER say never . . .

Yr