FILENAMES property (Image)
Description
When used with Get_Property this property returns the names of the files that are used by the image object. When used with Set_Property it sets the names of the files used by the image object.
Property Value
This property is an @Fm-delimited array of file names used to display the image at different DPI/Scaled settings. The position of a filename in the array corresponds to the DPI value for which it should be used, as illustrated in the following table.
Position | Display | DPIFactor |
---|---|---|
<1> | 96 | 100% |
<2> | 120 | 125% |
<3> | 144 | 150% |
<4> | 168 | 175% |
<5> | 192 | 200% |
<6> | 240 | 250% |
<7> | 288 | 300% |
<8> | 336 | 350% |
<9> | 384 | 400% |
<10> | 432 | 450% |
<11> | 480 | 500% |
Image file names can be in one of several formats:
• A path and file name of an image file.
• A path and file name to a resource file (such as a DLL) containing the image, along with its resource ID.
• The name of a "System Icon".
• The string "<memory> if the image has been set by the SETIMAGE method.
• The string "<HBITMAP>" if the image was set by the SETHBITMAP method.
(Note that the latter two formats cannot be used with Set_Property).
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
Get/Set | Get/Set | No | No | No |
Remarks
When a control has been given a set of multiple filenames to display
At runtime the Presentation Server takes the product of the parent form's SCALEFACTOR property and the DPI of the monitor on which it is displayed to calculate a "required DPI". This value is then compared to the items in the FILENAMES property to find the closest fit.
At runtime the actual file selected for display is determined by the product of the parent form's SCALEFACTOR property and the DPI of the monitor on which it is displayed, which results in a "required DPI".
The position of a filename in the array corresponds to a DPI value. At runtime the Presentation Server calculates a "required DPI" from the product of the
Example
$Insert Logical // Example: Set the auto-scaling of the background image for the // current window to FALSE$ Call Set_Property_Only( @Window, "AUTOSCALE", FALSE$ )
See Also
WINDOW SCALEFACTOR property, Image FILENAMES property, Appendix J - System Icons, Appendix K - High-DPI Programming