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!

Disabling the keys 1

Status
Not open for further replies.

progfox

Programmer
Jun 15, 2003
43
IN
Dear Sir,

Well I wanted to know whether we can disable the printscreen key of the key board from foxpro.Well I wanted to use this because i dont want any user to print screen my resource book i have developed. I have denied the access of saving and copying but i cant stop the printscreen process. So if possible pls provide me the solution.

Thanx & regards

Chandan

 
Check out the following threads:

Suppressing PRINT SCREEN KEY thread184-596608

Traping Windows keys ... thread184-608279



Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Chandan,

Regardless of the technical issues, I would be hesitant about doing this. Consider what would happen if your application crashed and left the key in its disabled state. The user would have to re-boot to regain the use of it. For that matter, the user would not be able to use the key in any application they are running at the same time as yours.

As a user, I would get pretty annoyed with software that did that to me. In general, I don't think that we, as developers, should mess around with the user's machine in this way If you don't trust your customers not to take screen shots of your book, maybe you should think of a different way of distributing it.

Well, that's just my humble opinion.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
I agree with Mike. Not only that are you going to disable every function key an application like Hypersnap uses? Or a probram that records movies of whats going on on the screen? I have several we use them for making demos.
 
progfox

If this is what your looking for, we had a problem solved by this forum using the following:

In your forms LOAD procedure add this:
* Disable the ability to copy, paste and cut

ON KEY LABEL CTRL+V *
ON KEY LABEL CTRL+C *
ON KEY LABEL CTRL+X *

In your forms DESTROY procedure add this:
* This allows the use of copy, paste and cut etc on shutdown
ON KEY LABEL CTRL+V
ON KEY LABEL CTRL+C
ON KEY LABEL CTRL+X


Place a timer on your form and in the timer procedure add this:

_CLIPTEXT="This Program is (c)2004 Your Company Name and You Are Not Allowed To Copy or Paste Any Images"

In the timer's properties set the interval to 5

This means that if someone does hit the printscreen button on the keyboard and ALT & TAB to another app that's open, if they try to paste the image they get the above message. This works perfect, credit to the user's who posted some of the above in the past.

Hope it helps
Lee.....

Alone we can do so little, together we can do so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top