ScreenVirtualSize()
Syntax
Result = ScreenVirtualSize(VirtualWidth, VirtualHeight)Description
Defines the virtual screen dimensions to automatically adjust the position of gadgets to the resolution.
This command is useful when the screen resolution is not known in advance.
Parameters
VirtualWidth, VirtuelHeight The virtual dimensions of the screen.
Return value
Of type float, corresponding to the minimum (actual width / virtual width, actual height / virtual height). This value can then be used to adjust the font size.
Remarks
If this command is used, the position and size of the gadget must be defined in these virtual dimensions.
Example
... fontratio.f = ScreenVirtualSize(1000, 500) SetScreenGadgetFont(#PB_Default, LoadFont(0, "Arial", 24*fontratio)) ...
Supported OS
All