Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto close feature
Message
From
12/02/2005 06:40:15
Somesh Sahu
Cybage Software Pvt Ltd,
Pune, India
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
00977685
Message ID:
00986252
Views:
29
Hi David,
Thanx a lot for your reply. I think it should solve the problem. I will apply it and
Mail you later.

Regds,
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform