PDA

View Full Version : Automatic ALT/TAB


R4CK
02-16-2009, 10:03 AM
Hi all!

I've got a problem with this alt tabber project.
What i'd like to do with:

2 or more window "slideshow" in full screen
timer function between 10 - 60 sec

The program is "not working perfectly" because, my project needs to be on top, because it is not changes the windows if i minimize it.

So please if someone have a little time to check, please do it!
It would be great if someone can tell me what is the solution for that problem.

Thx!

Imagine Programming
02-16-2009, 12:39 PM
This function will set a window on top:


function Window.SetAlwaysOnTop(hWnd, bOnTop)
if(bOnTop==true)then
local parms = hWnd .. ",-1,0,0,0,0,3";
DLL.CallFunction(_SystemFolder .. "\\User32.dll", "SetWindowPos", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
return true;
elseif(bOnTop==false)then
local parms = hWnd .. ",-2,0,0,0,0,3";
DLL.CallFunction(_SystemFolder .. "\\User32.dll", "SetWindowPos", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
return true;
else
return -1
end
end


Usage:

Window.SetAlwaysOnTop(Application.GetWndHandle(), true)
--Sets the window on top, false to restore this.

R4CK
02-18-2009, 04:08 AM
Thx for the fast reply!

It works well with your solution now!