Something in your code is not right. Here's what I just tried (using both SetWindowPos and TopMost)
I added a Timer to the form and set the Interval to 5000 (5 seconds). On form Load, I start the Timer, then I click a bunch of other programs to bring them on top of the form. After the 5 seconds, the form pops to the top and you can't bring another window in front of it. Here are the two methods:
<DllImport("user32.dll", SetLastError:=True)> _
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, _
ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, _
ByVal cy As Integer, ByVal uFlags As UInt32) As Boolean
End Function
ReadOnly HWND_TOPMOST As New IntPtr(-1)
Shared ReadOnly SWP_NOSIZE As UInt32 = Convert.ToUInt32(&H1)
Shared ReadOnly SWP_NOMOVE As UInt32 = Convert.ToUInt32(&H2)
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SetWindowPos(Me.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Sub
So, either something is wrong with your code, or your system is a bit messed up.