Make a window topmost

  1. 5 years ago

    Hamish S

    7 Sep 2013 Pre-Release Testers, Xojo Pro

    Although this isnt the most elegant it works.
    This allows you to make a window topmost so it appears over all others in windows.
    Put this in the open event.

     l = window3.left
      Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Int32, ByVal hWndInsertAfter As Int32, ByVal x As Int32, ByVal y As Int32, ByVal cx As Int32, ByVal cy As Int32, ByVal uFlags As Int32) As Int32
      const HWND_BOTTOM = 1
      const HWND_NOTOPMOST = -2
      const HWND_TOP = 0
      const HWND_TOPMOST = -1
      call SetWindowPos(Self.Handle, HWND_TOPMOST, l, t,w,h,0)

or Sign Up to reply!