View Full Version : Position of the exe

10-03-2005, 03:26 PM
How do i startup a AM exe and shows it self on the richt or left corner instead of the middle?.

10-03-2005, 03:50 PM
Hi, check out this page for some working examples on how to reposition your window:


You can add the action to your project startup so that it starts wherever you prefer. You can even use actions to determine the user's screen resolution for relative positioning, etc. Hope that helps. :)

10-03-2005, 03:55 PM
I'd start here:

-- This must be either TopLeft, TopRight, BottomLeft, or BottomRight
sLocation = "BottomLeft";

nHandle = Application.GetWndHandle();

tWindowSize = Window.GetSize(nHandle);
tScreenSize = System.GetDisplayInfo();

if sLocation == "TopLeft" then
nX = 0;
nY = 0;
elseif sLocation == "TopRight" then
nX = tScreenSize.Width-tWindowSize.Width;
nY = 0;
elseif sLocation == "BottomLeft" then
nX = 0;
nY = tScreenSize.Height-tWindowSize.Height;
elseif sLocation == "BottomRight" then
nX = tScreenSize.Width-tWindowSize.Width;
nY = tScreenSize.Height-tWindowSize.Height;

Window.SetPos(nHandle, nX, nY);

Keep in mind that this code doesn't take into account the position or size of the windows task-bar.

10-03-2005, 03:57 PM
Many Thanks :yes

This is very usefull for me.

10-04-2005, 08:39 AM
Excellent! I'm glad to be of help. Good luck with your project!