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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I temporarily disable all keyboard and mouse input?

Status
Not open for further replies.

jjjt

Technical User
Sep 15, 2002
34
GB
We have a vfp7 application that displays data using grids. As a grid is loading, a progress bar (which is essentially a form) is displayed, and all the progress bar functionality is wrapped up in a class. The grids tend to be on a pagegrame with active tabs, and the progress bar form will sit above that. The problem we have is that if the user clicks on one of the active tabs when the progress bar is displayed, it messes up the loading of the grid.

Is there any code that we can add to the progress bar class that will disable the mouse click events and all key press events for the time that the progress bar is active? We would need to disable all key presses apart from one key which would act as an escape key and stop the loading of the grid.

Any help is much appreciated.
 
Do you also want to prevent the user from switching to another Window's task during this time? i.e. Do you want to stop ALL keyboarding and mousing?

Rick
 
Sorry, I should have been more explicit - we don't want to prevent users from using other applications whilst the grid is loading, we just want to stop them from doing anything within our own app.
 


You may look at the suggestion I made in this thread :
thread184-734210

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,
That's why I asked the question, I believe your API call will lock down the whole system. To just ignore the keystokes and mousing in the VFP app, the framework would need to have a "global" property and code in all the forms and/or controls (I haven't worked this out fully yet :)) to ignore these events when the propery "flag" is on.

Rick
 
I have a similar problem. When I load data into a non data bound grid class that I use, I want to prevent the user clicking on another tab on the form etc.

Is there any way I can monitor keyboard and mouse input while the data is loading and not process it.

I know when data starts and ends loading.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top