No you cannot. What you'll have to do is you'll have to create a Low Level
Keyboard hood and handle that key being pressed. Unfortunately LL hooks
are not supported in .NET so you wont' be able to handle the keypress event
for the entire keyboard however you can use a normal key hook for your
thread and then handle the key press in your application.
Thanks! Robert Gruen
Microsoft, VB.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
#From: "Vicente Nicolau" <vnicolau@cadicsa.com>
#Subject: disable print screen key
#Date: Fri, 30 Apr 2004 09:09:57 +0200
#Lines: 3
#X-Priority: 3
#X-MSMail-Priority: Normal
#X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
#X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
#Message-ID: <OB$p8WoLEHA.3696@TK2MSFTNGP09.phx.gbl>
#Newsgroups: microsoft.public.dotnet.framework.clr
#NNTP-Posting-Host: 75.red-217-127-168.pooles.rima-tde.net 217.127.168.75
#Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP09.phx.gbl
#Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10442
#X-Tomcat-NG: microsoft.public.dotnet.framework.clr
#
#Hello, can I use the UIPermissions to disable the print screen key?
#
#
#
It's hard to prevent people from disassembling your code, but maybe that's
not the real problem.
If you don't want people to understand what you're doing, obfuscation is the
way to go. If your main concern is that someone might mess with your code
and modify it, take a look at creating assemblies with a strong name (using
snk.exe).
- Dennis
> Hello, can I use the UIPermissions to disable the print screen key?
Dennis Homann - 08 May 2004 00:55 GMT
Ooops, sorry, wrong thread.
- Dennis
> It's hard to prevent people from disassembling your code, but maybe that's
> not the real problem.
[quoted text clipped - 5 lines]
>
> - Dennis