Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Global Timer since last User's Input
Message
De
18/11/2004 10:39:35
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
18/11/2004 04:46:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00897805
Message ID:
00962634
Vues:
15
>Hi,
>
>I've made an application (menus, windows, browse etc.) in FPD 2.6 (under DOS) and now I have to make it password-protected, that means every user has to login and after 10 minutes of inactivity, nomather where he is in the program, he has to relogin. The application will start from windows98.
>I've looked over your example and I understood that I have to make o short VFP apllication in wich I have to call the Activitydetected procedure to see if from the last call there was a movement. (I hope it's right my deduction because I'am not a good programmer in VFP!!!). The problem is how do I end my main (DOS) application in a normal way (a sort of "quit"), without just let's say killing the process.
>Can you give me more clues or some examples?
>
>Thanks

Pasculescu,
For fox2x there was a plb file named Killit.plb as I remember (just guessing name-it had been a long time) that shows a countdown timer before executing a 'quit'.
For inactivity checks as I remember in DOS days I was using timeout clause and checking how read ended.
Also Fox2x had the ability to load and call bin (.com) files. I utilized assembly routines a lot in DOS days. Maybe you could do something with it too.
Sorry I don't have much ideas left for fox2x (getting older).

PS: Probably I didn't interpret your necessity right. Sounds all you need is to use timeout feature (hope I remember right and it was "read ... timeout ..."). Whatever that was what I did in the past was simple:
If timedout end read, invoke my screen saver, that reinstantiates read on input. I'll try to locate code and if I can in next 10 mins will post.
Found! Not sure if I could strip unnecessary code more than needed, hopefully not. Here is the skeleton:
do myController with SomeParmsHere
*       ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
*       º                                                         º
*       º                   MAIN Screen Layout                    º
*       º                                                         º
*       ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
*
do while .t.
#REGION 1
IF WVISIBLE("_qmm0zhjag")
	ACTIVATE WINDOW _qmm0zhjag SAME
ELSE
	ACTIVATE WINDOW _qmm0zhjag NOSHOW
ENDIF
* code here...
READ CYCLE ;
	SHOW _qmm0zhjy2() ;
	ACTIVATE ENTRY() ;
	timeout 60
RELEASE WINDOW _qmm0zhjag


*       ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
*       º                                                         º
*       º                    Closing Databases                    º
*       º                                                         º
*       ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
*
* ...
if !readkey()%256=20
	exit
else
    do myController with SomeParmsHere
endif
enddo

FUNCTION ENTRY
* code that does setup for main screen
* saving,restoring tables, recnos etc

procedure myController
parameter ...
* ... Invoke screen saver
IF NOT WEXIST("_qmm0zhjag")
	DEFINE WINDOW _qmm0zhjag ;
		FROM 0, 0 ;
		TO 17,79 ;
		TITLE "MyTitle" ;
		NOFLOAT ;
		NOCLOSE ;
		SHADOW ;
		DOUBLE ;
		COLOR SCHEME 1
ENDIF
wait ""
RELEASE WINDOW "SCRSAVER"
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform