Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can VFP listen for Windows 'events' ?

Status
Not open for further replies.

MossNelson

Programmer
Oct 30, 2003
26
US
I have a VFP9 application that runs on a terminal server. Users log in to the Terminal Server session and then log in again to the application.

The problem is that sometimes users just shut down their TS session thereby depriving the application of a required auditing logout record.

I would like to provide a warning advising them to log out of the application if they try to close down their remote session without logging out first.

This would be similar to the "Cannot Quit Visual FoxPro" message when a read is in effect. Of course one could always shut down their computer if they really wanted to but let's assume they want to cooperate and that's where I think a reminder message would come in.

I was advised to use the windows function called WTSRegisterSessionNotification but am not sure if this is possible from within FoxPro. Has anyone else dealt with a similar situation in Terminal Server?
 
Look in the Solutions Samples that ship with VFP 9.0. You'll find one called "Binding to Windows Message Events".

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top