#Include once "window9.bi"

Function SetWindowTop(ByVal wnd As HWND,ByVal state As Integer) As Integer Export
  If state=1 Then
    Return SetWindowPos(wnd,HWND_TOPMOST  ,0,0,0,0,SWP_NOMOVE Or SWP_NOSIZE)
  Else
    Return SetWindowPos(wnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE Or SWP_NOSIZE)
  EndIf
End Function
