Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form with MaxWidth/MaxHeight maximizes
Message
De
17/02/2014 13:18:08
 
 
À
13/02/2014 10:24:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01594236
Message ID:
01594501
Vues:
104
>>I have a form class for which I've set MaxWidth and MaxHeight. When I click the maximize button in the form, it properly maximizes to the size I've specified.
>>However, the form runs inside a top-level window. If the top-level window is minimized and then restored while my form is maximized, when it reappears, my form now fills the top-level window, ignoring MaxWidth and MaxHeight. The same thing happens if I maximize the top-level window while my form is maximized.
>>Anybody run into this? Have any ideas how to prevent it?
>>Tamar
>
>On windows where I've needed a hard size I've used a DLL to subclass the window, intercepting and altering the WM_SIZING message that is sent continually as the user resizes a window, which allows the program to alter the size and affix it to a maximum or minimum). I have invoked this as some startup code in Init() which registers the thisForm.hwnd, and the min and max widths and heights.
>
>http://msdn.microsoft.com/en-us/library/windows/desktop/ms632646%28v=vs.85%29.aspx

Turns out I didn't need a DLL or BindEvent(), just code in Resize that catches any attempt to go beyond my specified maxes and reset.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform