Announcement

Collapse
No announcement yet.

Window.GetSize on windows 10

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

  • Window.GetSize on windows 10

    Hello everyone.
    The aim is to position the window at the bottom with adjustment in width :
    Code:
    display = System.GetDisplayInfo();
    result = Window.GetSize(Application.GetWndHandle());
    handle = Application.GetWndHandle();
    x=display.Height -  result.Height
    Window.SetPos(handle,0,x);
    Window.SetSize(Application.GetWndHandle(), display.Width,result.Height);
    The position is correct under windows xp and windows 7 but not under windows 10 ! There are right, left and bottom margins !


  • #2
    Long time since I've done anything with AMS . On my Win10 system if I set the project window to flat then this code:-

    tdisplay = System.GetDisplayInfo();
    w=tdisplay.Width
    h=tdisplay.Height
    Window.SetSize(Application.GetWndHandle(), w, h/2);
    Window.SetPos(Application.GetWndHandle(), 0, h/2);

    works perfectly but if I change project window to standard then I also get a little bit of the desktop peeking through - try a flat window.

    Comment


    • #3
      Thank you longedge but in my project I am obliged to use a window :(

      Comment


      • #4
        What is the difference in pixel between a window (border) under windows 10 and 7 ?

        Comment


        • #5
          What is the difference in pixel between a window (border) under windows 10 and 7 ?
          The answer is 7 pixels

          Comment


          • #6
            In times past when I was actually using AMS I would probably have spoofed it and not worried about the why's and wherefore's . If you're interested the attached apz works on my computer.
            Attached Files

            Comment


            • #7
              Thank you longedge
              im added this command on my code

              Code:
              display = System.GetDisplayInfo();
              result = Window.GetSize(Application.GetWndHandle());
              
              handle = Application.GetWndHandle();
              x=display.Height-  result.Height
              Window.SetPos(handle,0,x);
              Window.SetSize(Application.GetWndHandle(), display.Width,result.Height;);
              ------------------------------------------------------------------------------------------------------------------
              osName = System.GetOSName();
              if ((osName == "Windows 10") or (osName == "Windows Server 10")) then 
                  Window.SetSize(Application.GetWndHandle(), display.Width+16,result.Height;);
                  Window.SetPos(handle,-8,x+8);
              end;
              -------------------------------------------------------------------------------------------------------------------

              Comment


              • #8
                Using flat mode meaning nothing anymore, all mine are done in flat mode and still look and feel like there window apps, don't get windows and flat mode confused in a means that you can't do the same, older versions of 8 don't work right on windows mode so we all changed to flat made along time ago for apps we need to mess with sizes

                Plugins or Sources MokoX
                BunnyHop Here

                Comment

                Working...
                X