Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing a real DPI-aware VFP application
Message
De
06/02/2021 14:23:55
 
 
À
05/02/2021 17:15:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01678100
Message ID:
01678126
Vues:
92
J'aime (1)
[Although this is a reply to self, it's mainly an update on the conversation, with special thanks to Lutz and Walter]

In the absence of suggestions, I picked up a resizer class from Irwin Rodriguez at https://github.com/Irwin1985/VFPStretch (Irwin is a regular VFPX contributor, and his repositories at GitHub are well worth an extended visit). This particular class derives from Codemine's Stretchy Resize Control, but I haven't looked yet on this ancestry.

When a VfpStretch object processes a Form, it binds a Stretch() method to the Form's Resize event. I removed that binding for my adaptation, and the VfpStretch object is now stretching the Form only once.

If the Form is resizeable, a user can continue to resize it at his/her will, or the application can decide to change its dimensions by code. In either case, stretching by the VfpStretch object won't have to occur again.

It was relatively simple to adapt, and the immediate results are encouraging. I didn't have to touch the Forms I used for testing yet.

The attached screenshots demonstrate the effect of the adaptation on a non-subclassed form. The first two screenshots represent the Form running at 96DPI, display scale at 100%, and the others running at 120DPI, display scale at 125%.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform