I have an app that works fine on my system:
But on a user's system it looks like this:
Does anyone have any ideas how to deal with this?
I noticed a thread somewhere that looked like it dealt with Windows scale sizes. (Cannot find it now).
But would that mean changing graphics for every possible scale?
Also more importantly - Notice the memo field doe not look correct either.
Any thoughts appreciated.
Dealing with Windows Scaling
Moderators: Dorian (MJT support), JRL
- Phil Pendlebury
- Automation Wizard
- Posts: 538
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Dealing with Windows Scaling
Phil Pendlebury - Linktree
- Phil Pendlebury
- Automation Wizard
- Posts: 538
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Re: Dealing with Windows Scaling
Ok I found a post about scaling and added some info:
Code: Select all
// 96 – Smaller 100%
// 120 – Medium 125%
// 144 – Larger 150%
// 192 – Extra Large 200%
// 240 – Custom 250%
// 288 – Custom 300%
// 384 – Custom 400%
// 480 – Custom 500%
LibFunc>User32,GetDC,hDC,0
LibFunc>GDI32,GetDeviceCaps,Result,hDC,88
// Test (300% Scaled)
Let>Result=288
Let>ResBy96=Result/96
Let>ResPerc=ResBy96*100
messagemodal>%ResPerc%% is the scaling factor
// So if a box is 50x60
// and you ned to scale it
Let>xboxdim=50
Let>yboxdim=60
//
Let>xboxdimx=xboxdim/100
Let>xboxdimx=xboxdimx*ResPerc
Let>yboxdimy=yboxdim/100
Let>yboxdimy=yboxdimy*ResPerc
MDL>Original x: %xboxdim% will now be: %xboxdimx%%CRLF%Original y: %yboxdim% will now be: %yboxdimy%
Phil Pendlebury - Linktree
- Phil Pendlebury
- Automation Wizard
- Posts: 538
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Re: Dealing with Windows Scaling
So for the memo field we only need to adjust height:
For graphics I think we need different res graphics for all percentages.
Code: Select all
GetDialogProperty>Dialog1,MSMemo1,Height,memoheight
Let>xboxdimx=memoheight/100
Let>xboxdimx=xboxdimx*ResPerc
SetDialogProperty>Dialog1,MSMemo1,Height,xboxdimx
Phil Pendlebury - Linktree
- Phil Pendlebury
- Automation Wizard
- Posts: 538
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Re: Dealing with Windows Scaling
So for the memo field we only need to adjust height:
For graphics I think we need different res graphics for all percentages.
Code: Select all
GetDialogProperty>Dialog1,MSMemo1,Height,memoheight
Let>xboxdimx=memoheight/100
Let>xboxdimx=xboxdimx*ResPerc
SetDialogProperty>Dialog1,MSMemo1,Height,xboxdimx
Phil Pendlebury - Linktree
- Phil Pendlebury
- Automation Wizard
- Posts: 538
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Re: Dealing with Windows Scaling
And for graphics we need to do this, after making different graphics for each resolution and naming them for example 100logo.jpg 125logo.jpg etc.:
Code: Select all
SetDialogProperty>Dialog1,MSImage1,LoadImage,%SCRIPT_DIR%/%logos%/%ResPerc%logo.jpg
Phil Pendlebury - Linktree