Try SetForegroundWindow
VB Code:
  1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  2. Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
  3. Private Sub Form_Load()
  4.     'KPD-Team 1999
  5.     'URL: [url]http://www.allapi.net/[/url]
  6.     'E-Mail: [email][email protected][/email]
  7.     Dim lHandle As Long
  8.     'First we're going to retrieve the handle of this window
  9.     ' "ThunderRT5Form" is the classname of a VB-window
  10.     lHandle = FindWindow("ThunderRT5Form", Me.Caption)
  11.     'Set this window to the foreground
  12.     lHandle = SetForegroundWindow(lHandle)
  13. End Sub