View Full Version : Position of the exe
How do i startup a AM exe and shows it self on the richt or left corner instead of the middle?.
Corey
10-03-2005, 03:50 PM
Hi, check out this page for some working examples on how to reposition your window:
http://www.indigorose.com/webhelp/ams60/Program_Reference/Actions/Window.SetPos_Examples.htm
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. :)
Desmond
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;
end
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.
Many Thanks :yes
This is very usefull for me.
Desmond
10-04-2005, 08:39 AM
Excellent! I'm glad to be of help. Good luck with your project!
Powered by vBulletin™ Version 4.0.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.