Announcement

Collapse
No announcement yet.

Auto Position in diferent resolutions

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

  • Ewertongba99
    replied
    Originally posted by Centauri Soldier View Post
    Place the exe in manually using your file explorer instead of importing through the IDE. Also, why would you import it if you just want to run it? Just put the fully qualified path into a call using Shell.Execute().
    I'm from brazil and i dont undestand so much of autoplay codes, i'm using this forum to help me out.

    Leave a comment:


  • Centauri Soldier
    replied
    Place the exe in manually using your file explorer instead of importing through the IDE. Also, why would you import it if you just want to run it? Just put the fully qualified path into a call using Shell.Execute().

    Leave a comment:


  • Ewertongba99
    replied
    Originally posted by colc View Post
    Left edge of screen is zero so use
    Code:
    Window.SetPos(hWnd, 0, tDesktop.Height-tWindow.Height - 40);--40 for taskbar
    Cheers
    Thankyou, i've try this and works too, Window.SetPos(hWnd, tDesktop.Width-tWindow.Width - tDesktop.Width-tWindow.Width + 450, tDesktop.Height-tWindow.Height - 40);--40 for taskbar

    450 is the size of my project.

    You can help more please?

    I would like to run an EXE file that is not in the DOCS folder in my project, in fact it is on the network, but every time I add an EXE to my project it soon adds the DOCS folder, is it possible to run an external EXE?

    Leave a comment:


  • colc
    replied
    Left edge of screen is zero so use
    Code:
    Window.SetPos(hWnd, 0, tDesktop.Height-tWindow.Height - 40);--40 for taskbar
    Cheers

    Leave a comment:


  • Ewertongba99
    replied
    Originally posted by colc View Post
    A search of the forums would have found your answer
    try this

    Code:
    --Position Window Use On Start or On Show Event
    
    local tDesktop = System.GetDisplayInfo();
    local hWnd = Application.GetWndHandle();
    local tWindow = Window.GetSize(hWnd);
    Window.SetPos(hWnd, tDesktop.Width-tWindow.Width, tDesktop.Height-tWindow.Height - 40);--40 for taskbar
    or for a DialogueEX
    Code:
    --Position Dialog On Show
    
    local tDesktop = System.GetDisplayInfo();
    local hWnd = DialogEx.GetWndHandle();
    local tWindow = Window.GetSize(hWnd);
    Window.SetPos(hWnd, tDesktop.Width-tWindow.Width, tDesktop.Height-tWindow.Height - 40);--40 for taskbar
    Code thanks to Ulrich

    Cheers
    OMG OMG OMG IT JUST WORKS THANKS, Now, what a need to do to invert this to bottom left? I try something here but withou sucess, thakyou!

    Leave a comment:


  • colc
    replied
    A search of the forums would have found your answer
    try this

    Code:
    --Position Window  Use On Start or On Show Event
    
    local tDesktop = System.GetDisplayInfo();
    local hWnd = Application.GetWndHandle();
    local tWindow = Window.GetSize(hWnd);
    Window.SetPos(hWnd, tDesktop.Width-tWindow.Width, tDesktop.Height-tWindow.Height - 40);--40 for taskbar
    or for a DialogueEX
    Code:
    --Position Dialog On Show
    
    local tDesktop = System.GetDisplayInfo();
    local hWnd = DialogEx.GetWndHandle();
    local tWindow = Window.GetSize(hWnd);
    Window.SetPos(hWnd, tDesktop.Width-tWindow.Width, tDesktop.Height-tWindow.Height - 40);--40 for taskbar
    Code thanks to Ulrich

    Cheers

    Leave a comment:


  • Ewertongba99
    started a topic Auto Position in diferent resolutions

    Auto Position in diferent resolutions

    I have a project that I want that when it opens, that it always be in the same place regardless of the computer's resolution, I want it to always open in the lower right corner, (I don't always want to move it) as in the image I'm sending, are there any codes that help me?
    Attached Files
Working...
X