Link to home
Start Free TrialLog in
Avatar of dba123
dba123

asked on

How to fire off my VB.NET code when user hits Print Screen on their keyboard

How can I tie a VB.NET console appliction to the print screen key?  Is there any way to capture that and then run some VB.NET code if a user clicks their Print Screen button?  I'd just put an exe or something on their hard disk and want them to push the print screen key then my code would fire off
Avatar of davidrichardson
davidrichardson

not sure if this is what your looking for

http://www.codeproject.com/vb/net/mclhotkeynet.asp
this is a shady post...  you want to essentially keep tabs on key press events at all times the computer is running.  and when your key press event happens fire and exe.  That sounds like virus, spyware development to me.
however, i'm sure your a nice guy... soo...

create a windows service that starts at startup and captures the keypress event using windows api.  then using system.diagnostics fire your exe.
dont forget the printscreen button only fires the Keyup event
what david said.
Avatar of dba123

ASKER

>>>this is a shady post...  you want to essentially keep tabs on key press events at all times the computer is running.  and when your key press event happens fire and exe.  That sounds like virus, spyware development to me.

no, this is for our IT department.  We h ave a shitty 3rd party app which I dno't support and I've been asked to create this because our users are morons...more than regular moron users and they do not have access to Outlook and therefore cannot send us print screens when these criptic errors keep coming up....which has hosed our systems for 2 weeks.  Basically my boss and the network admins are going nuts and have asked the users to send them screen shots.  Well, only the managers can do this.  So they need a simply way, other than having to create 200 email accounts, to allow them to print screen so we can collect screen shots and save time in troubleshooting our issue.

I do not work for a software company so this definitely isn't spam.  I just want to trigger my VB.NET code off a keystroke, this has to be a common items people have coded for legit purposes...it's simple to think about but I can't find anything about doing this on the print screen button
fair enough, you do however, see the danger of explaining how to create a keystroke recorder is made on this forum.
** stupid fingers Nix the is made part.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial