Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto close feature
Message
 
 
À
10/02/2005 09:24:58
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:
00985595
Vues:
48
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.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform