I am trying to display a form that sits on top of all other forms in the application but sits behing any windows form other processes that the user might switch to. I want to load this for from a user control.
I currently have a work around using the follwing code but I looking for something a bit swisher.
Private Sub Timer1_Timer()
Dim lngHandle As Long
Timer1.Enabled = False
lngHandle = GetActiveWindow
If lngHandle <> mlngFormHWND Then
If lngHandle = mlngParentHWND Then
SetWindowPos moPlanner.hWnd, HWND_TOPMOST, _
0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
SetWindowPos moPlanner.hWnd, HWND_BOTTOM, _
0, 0, 0, 0, SWP_NOACTIVATE Or _
SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
Timer1.Enabled = True