How can I get if my Window is in the top or in the bottom of all windows?
Greetings!
Greetings!
-- add to global gunctions function IsAppTopLevel(sWindowName) fHwnd = WinApi.GetForegroundWindow(); aHwnd = Application.GetWndHandle(); local ret = false if fHwnd == aHwnd then ret = true end return ret end -- example use if IsAppTopLevel("TopLevelWindow") then Label.SetText("Label1", "App is on top"); else Label.SetText("Label1", "App is NOT on top"); end
-- add to global gunctions function IsAppTopLevel() local fHwnd, aHwnd fHwnd = tonumber(DLL.CallFunction("user32.dll", "GetForegroundWindow", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)); aHwnd = Application.GetWndHandle(); if fHwnd == aHwnd then return true else return false end end -- example use if IsAppTopLevel() then Label.SetText("Label1", "App is on top"); else Label.SetText("Label1", "App is NOT on top"); end
Window.SetOrder(Application.GetWndHandle(), HWND_TOPMOST);
Window.SetOrder(Application.GetWndHandle(), HWND_NOTOPMOST);
Comment