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?
Announcement
Collapse
No announcement yet.
Auto Position in diferent resolutions
Collapse
X
-
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
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
Cheers
- Likes 1
-
Originally posted by colc View PostA 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
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
Cheers
Comment
-
Originally posted by colc View PostLeft edge of screen is zero so use
Code:Window.SetPos(hWnd, 0, 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?
Comment
-
Originally posted by Centauri Soldier View PostPlace 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().
Comment
Comment