Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving an object after a form is moved.
Message
De
11/09/2002 21:29:24
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00699457
Message ID:
00699601
Vues:
21
Thanks, David. In fact, the 'This.Timer1.Reset' line isn't really required, but it helps to stop the accidentals if the user doesn't always move the form smoothly.

Alan

>Alan,
>
>A clever use of the fact that a timer won't fire while VFP is off handling events like moving a form!
>
>>Yep, you got me on that one. Ok then, I just tried this out, and it seems to work ok:
>>
>>Put a disabled timer on the form. Set the timer's interval to around 250. In the TimerEvent, first disable the timer, and then add your code to move the Character.
>>
>>In the Form's moved() event, do this:
>>
>>
This.Timer1.Enabled = .T.
>>This.Timer1.Reset
>>
>>
>>The TimerEvent will fire when you stop moving the form - regardless whether you let go of the mouse button.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform