Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine start and end of form resize
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01179361
Message ID:
01179727
Views:
21
Thanks Sorin - I figured one option might be a timer - and voila - you provided! Thanks!


>Hi Terry,
>
>Would this work for you?
>
>
>PUBLIC oFrm	&& run as test from Command Window
>oFrm = CREATEOBJECT("frmResize")
>oFrm.Show()
>RETURN
>
>DEFINE CLASS frmResize AS Form
>   AutoCenter = .T.
>   ADD OBJECT tmrResize AS tmrResize
>
>   ***************************
>   FUNCTION Resize
>   ***************************
>   This.tmrResize.Enabled = .T.
>
>ENDDEFINE
>
>DEFINE CLASS tmrResize AS Timer
>   Enabled = .F.
>   Interval = 20	&& event tracking resolution
>
>   ***********************
>   FUNCTION Timer
>   ***********************
>   IF NOT MDOWN()
>      This.Enabled = .F.
>   ENDIF
>
>   ***************************
>   FUNCTION Enabled_Assign
>   LPARAMETERS vNewval
>   ***************************
>   LOCAL vOldval
>   vOldval = This.Enabled
>   This.Enabled = m.vNewval
>   IF This.Enabled <> m.vOldval
>      IF This.Enabled
>         This.EventStarted()
>      ELSE
>         This.EventEnded()
>      ENDIF
>   ENDIF
>
>   *****************************
>   FUNCTION EventStarted
>   *****************************
>   ACTIVATE SCREEN
>   ? TIME(1), "Event Started"
>
>   *****************************
>   FUNCTION EventEnded
>   *****************************
>   ACTIVATE SCREEN
>   ? TIME(1), "Event Ended"
>   ?
>
>ENDDEFINE
>
>
>
>>My project requires a process be run when a form resize starts, and another process when it ends.
>>
>>My hope was that a form mouse down would fire but it seems not to be available when the mouse pointer changes to the resize "arrows".
>>
>>I also looked at the HELP BINDEVENTS using the _SCREEN resize example but it seems to call the "delegate" resize through the entire resize event (while the mouse is down.
>>
>>If there is a way to assess a process at "the beginning of" and "at the end", but "not during" the form's resize.
>>
>>I haven't yet shoppeded for an API message service.
>>
>>AHA!
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform