Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

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
0
dba123
Asked:
dba123
1 Solution
 
davidrichardsonCommented:
not sure if this is what your looking for

http://www.codeproject.com/vb/net/mclhotkeynet.asp
0
 
mydasxCommented:
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.
0
 
mydasxCommented:
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
davidrichardsonCommented:
dont forget the printscreen button only fires the Keyup event
0
 
mydasxCommented:
what david said.
0
 
dba123Author Commented:
>>>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
0
 
mydasxCommented:
fair enough, you do however, see the danger of explaining how to create a keystroke recorder is made on this forum.
0
 
mydasxCommented:
** stupid fingers Nix the is made part.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
dba123,

I wouldn't use a Console application to do this.  Console apps are NOT designed to sit around waiting for an event to happen.

Use the code I gave you in your other question:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21864637.html

You can load up the app and then make the main form invisible so that it isn't apparent to the end user...

Or you can build a class based on the ApplicationContext() class and set it up to be the "message loop" loaded up from a Sub Main().

~IM
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now