Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form resized by user
Message
From
14/04/2009 05:20:37
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01394503
Message ID:
01394724
Views:
79
Interesting aproach. I did manage with simple flag as Stefan suggested
but will defenetely save this one for future use.

Thank You Steve


>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
> *====================================================
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform