I made this simple Screen Sizer window to help me size presentations for Dev Con and Clarion Live webinars. It is useful for testing what will fit.
You do have to consider Zoom Factor e.g. my Surface is 2736x1824 but runs at 200% so effectively 1/2 that at 1368 x 912 which is not far off from what a typical Laptop at 1366x768 was before hi rez:
With Clarion resized to fit inside the window.
The Source that relies on PROP:Pixels to set the size …
!ClarionLive presentations should be HD 1920x1080. This window helps size the IDE and other windows while I work at 2560x1440.
PROGRAM
INCLUDE('KEYCODES.CLW')
MAP
SetWH PROCEDURE(LONG W1, LONG H1, USHORT Scale=100)
AskWH PROCEDURE(),BOOL
END
Wnd WINDOW('1920x1080 Window - Blue Area only - Right click for Options'),AT(,,395,224),GRAY,FONT('Segoe UI',16),SYSTEM,ICON(Icon:Child),ALRT(MouseRight)
IMAGE('HD1920x1080.png'),AT(0,0),USE(?Image1920)
STRING('1920 x 1080'),AT(2,1),FONT(,,Color:White),TRN,USE(?Rez)
END
W LONG(1920)
H LONG(1080)
CODE
OPEN(Wnd)
0{PROP:Pixels}=1
SETPOSITION(0,,,1920,1080)
ACCEPT
IF EVENT()=EVENT:AlertKey AND KEYCODE()=MouseRight THEN
SETKEYCODE(0)
EXECUTE POPUP('1920 x 1080 <9>ClarionLive|1600 x 900|1366 x 768 <9>Laptop|1280 x 720 <9>720p' & |
'|-|1280 x 800 <9>CIDC 2019' & |
'|-|1024 x 768 <9>4:3|800 x 600|640 x 480' & |
'|-|Microsoft Surface{{2736 x 1824 200% SurfacePro 4+' & |
'|2256 x 1504 150% Laptop 13.5' & |
'|2496 x 1664 150% Laptop 15' & |
'|3000 x 2000 200% Book 13.5' & |
'|3240 x 2160 200% Book 15' & |
'}|-|Specify...')
SetWH(1920 , 1080)
SetWH(1600 , 900 )
SetWH(1366 , 768 )
SetWH(1280 , 720 )
SetWH(1280 , 800 )
SetWH(1024 , 768 )
SetWH(800 , 600 )
SetWH(640 , 480 )
SetWH(2736 , 1824 , 200) !SurfacePro 4+
SetWH(2256 , 1504 , 150) !Surface Laptop 13.5
SetWH(2496 , 1664 , 150)
SetWH(3000 , 2000 , 200) !Surface Book 13.5
SetWH(3240 , 2160 , 200)
IF ~AskWH() THEN CYCLE.
ELSE ; CYCLE
END
SETPOSITION(0,,,W,H)
0{PROP:Text}=W & 'x' & H &' Window'
?Rez{PROP:Text}=W & ' x ' & H
END
END
SetWH PROCEDURE(LONG W1, LONG H1, USHORT Scale=100)
CODE
W=W1/(Scale/100)
H=H1/(Scale/100)
RETURN
AskWH PROCEDURE()
W1 LONG
H1 LONG
B BOOL
RWnd WINDOW('New Resolution'),AT(,,142,57),GRAY,SYSTEM,ICON(ICON:Child),FONT('Segoe UI',10)
ENTRY(@n5),AT(27,8),USE(W1),REQ
STRING(' X '),AT(65,10),USE(?X)
ENTRY(@n5),AT(79,8),USE(H1),REQ
BUTTON('&Ok'),AT(23,29,40),USE(?Ok),DEFAULT,REQ
BUTTON('&Cancel'),AT(79,29,40),USE(?Can),STD(STD:Close)
END
CODE
W1=W ; H1=H
Open(RWnd)
ACCEPT
IF ACCEPTED()=?Ok THEN
W=CHOOSE(W1<320,320,W1)
H=CHOOSE(H1<240,240,H1)
B=1
BREAK
END
END
RETURN B
Proj1920resizer.zip (46.7 KB)