Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto close feature
Message
De
21/04/2005 02:49:36
Somesh Sahu
Cybage Software Pvt Ltd,
Pune, Inde
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
00977685
Message ID:
01006846
Vues:
36
Hi David,
How are you?
I successfully implemented the Auto closure feature :-). Your suggestions helped me a lot. Thanks for your guidance. Hope in future we will have more discussions.
Are you working as a professional Software Developer or running your own company?

Regards,
Somesh


>Somesh,
>
>The error must be occuring in some other code because there's no reference to ActiveForm in the code below.
>
>Whenever you try and use ActiveForm or ActiveControl you should always be testing it beforehand to make sure it currently points to an object.
>
>
if ( type( "_screen.ActiveForm" ) == "O" )
>   * there is a form currently active
>   ...
>endif
>
>>Hi,
>> For the Auto Closure feature in the Application, I am using a Timer Control on the 'Main Form (which remains open for enitre session of the application)'. This timer checks the Inactivity of the User at the Time Interval and closes all the open forms and then quits from the application. It works fine with the forms but does not work when a report is in Print Preview mode or any Menu is Open and User is idle for Auto Closure time. It gives error 'Activeform is not an Object'.
>>
>> The code in the Timer event of the Timer Control is as follows -
>> IF MROW("SCREEN",3) == THISFORM.Last_MouseRow AND MCOL("SCREEN",3) == ; THISFORM.Last_MouseCol AND THISFORM.Last_Key == LASTKEY()
>>
>> IF NOT ExitApp(.F.)
>> NODEFAULT
>> ENDIF
>>
>> ENDIF
>> THISFORM.Last_MouseRow = MROW("SCREEN",3)
>> THISFORM.Last_MouseCol = MCOL("SCREEN",3)
>> THISFORM.Last_Key = LASTKEY()
>>
>> Whenever Mouse is moved or any key is pressed, Last_MouseRow, Last_MouseCol and Last_Key properties are changed.If no change is find, then 'ExitApp' function closes all the forms and quits the application.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform