Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form resized by user
Message
 
 
À
13/04/2009 04:14:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01394503
Message ID:
01394549
Vues:
55
This message has been marked as a message which has helped to the initial question of the thread.
Srdjan,

The following code will cause the two methods to fire when the user resizes the form. OnWindowResizeEnter fires BEFORE the user begins resizing. OnWindowResizeExit fires AFTER the user is done resizing. This is something that you can't get with any of the standard VFP events.

I included some code at the end that runs AS the user resizes the form. This is very similar to the VFP resize so you might not need it.

Thanks,

Steve

*---------------------------------------------------------------------
* Set the API calls for intercepting the Windoes resizing messages
*---------------------------------------------------------------------
#define WM_ENTERSIZEMOVE 0x0231
#define WM_EXITSIZEMOVE 0x0232
#define WM_SIZE 0x0005

#define BE_FireAfterEvent 0

BINDEVENT (ThisForm.HWnd, WM_ENTERSIZEMOVE, ;
This, "OnWindowResizeEnter", ;
BE_FireAfterEvent)
BINDEVENT (ThisForm.HWnd, WM_EXITSIZEMOVE, ;
This, "OnWindowResizeExit", ;
BE_FireAfterEvent)

METHOD CODE For OnWindowResizeEnter
LPARAMETERS hWnd, nMsg, nwParam, nlParam

METHOD CODE For OnWindowResizeExit
LPARAMETERS hWnd, nMsg, nwParam, nlParam


*====================================================
* Expanded resize event
*====================================================
*!* BINDEVENT (This.HWnd, WM_SIZE, ;
*!* ThisForm, "OnWindowSizeChange", ;
*!* BE_FireAfterEvent)

*!* Method OnWindowSizeChange
*!* LPARAMETERS hWnd, nMsg, nwParam, nlParam

*!* #DEFINE SIZE_RESTORED 0
*!* #DEFINE SIZE_MINIMIZED 1
*!* #DEFINE SIZE_MAXIMIZED 2
*!* #DEFINE SIZE_MAXSHOW 3
*!* #DEFINE SIZE_MAXHIDE 4

*!* DO CASE
*!* CASE nwParam = SIZE_RESTORED
*!* * MESSAGEBOX("Restored")
*!* CASE nwParam = SIZE_MINIMIZED
*!* * MESSAGEBOX("Minimized")
*!* CASE nwParam = SIZE_MAXIMIZED
*!* * MESSAGEBOX("Maximized")
*!* CASE nwParam = SIZE_MAXSHOW
*!* CASE nwParam = SIZE_MAXHIDE
*!* ENDCASE

*!* RETURN 0
*====================================================
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform