Hey guys. I have a form, no title bar, no control box, no border.

Now what happens is that I've registered a system wide hotkey. A combination of "shift + U".

Everything works. When the form has focus, the hotkey fires an event where i display a message box. But when I am on other window (lets say IE, or on the desktop), the hotkey STILL fires the event..

BUT I need to know how to bring my form on top.

This code works perfect but has a flaw (keep reading)

vb.net Code:
  1. Public Delegate Sub moveTopMostInvoker()
  2.     Private Sub SystemWideHotkeyComponent1_HotkeyPressed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SystemWideHotkeyComponent1.HotkeyPressed
  3.         If Me.InvokeRequired Then
  4.             Me.Invoke(New moveTopMostInvoker(AddressOf moveTopMost))
  5.         Else
  6.             moveTopMost()
  7.         End If
  8.         MsgBox("haza")
  9.     End Sub
  10.  
  11.     Public Sub moveTopMost()
  12.         Me.TopMost = True
  13.         Me.Focus()
  14.     End Sub

However, when the form goes on top obviously the topmost property is true and therefore it dosnt go back in the background.

How can I make it so it comes up. Remember a event fires if my application is running regardless of whether it has focus or not.