Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

Position of the exe

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?.

  • #2
    Hi, check out this page for some working examples on how to reposition your window:

    http://www.indigorose.com/webhelp/am...s_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.

    Comment


    • #3
      I'd start here:

      Code:
      -- 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.

      Comment


      • #4
        Many Thanks :yes

        This is very usefull for me.

        Comment


        • #5
          Excellent! I'm glad to be of help. Good luck with your project!

          Comment

          Working...
          X