PC Review


Reply
Thread Tools Rate Thread

code to intercept 'printscreen' key?

 
 
Keith
Guest
Posts: n/a
 
      23rd Jan 2007
Can anyone point me to a code snippet I could use to run a macro every time
the print screen key is pushed (after allowing the normal printscreen
function of capturing whatever is onscreen as an image)? Basically I want to
automate pasting the new image and doing some other stuff, but I want tit to
be dependent on the printscreen key.... also, I'd like this to occur even if
Excel is not the active window/application, just as long as it is open.

Is this possible, and if so, can anyone point me to examples of how to do
it?

Thanks!
Keith


 
Reply With Quote
 
 
 
 
Excelibur
Guest
Posts: n/a
 
      23rd Jan 2007
To my knowledge, this is not possible. In the code window, type OnKey
and press F1 to get help on it. It displays all the keys you can
intercept in Excel.

If you really need it, it should be possible with external tools like
AutoIt, but I wouldn't recommend it as it will become a messy solution.

On 23 jan, 18:07, "Keith" <fake_address@not_a_real_address.org.net.com>
wrote:
> Can anyone point me to a code snippet I could use to run a macro every time
> the print screen key is pushed (after allowing the normal printscreen
> function of capturing whatever is onscreen as an image)? Basically I want to
> automate pasting the new image and doing some other stuff, but I want tit to
> be dependent on the printscreen key.... also, I'd like this to occur even if
> Excel is not the active window/application, just as long as it is open.
>
> Is this possible, and if so, can anyone point me to examples of how to do
> it?
>
> Thanks!
> Keith


 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      24th Jan 2007
If you do not want to trigger the PrintScreen key press, then I guess you
would need to look into a system wide key board hook:
http://vbnet.mvps.org/code/subclass/registerhotkey.htm
http://vbnet.mvps.org/code/hooks/setwindowshookex.htm

If you can provide a button on the WS/Userform, it is much easier. This
should get you started:
http://groups.google.co.uk/group/mic...b8eb5535dab085

NickHK

"Keith" <fake_address@not_a_real_address.org.net.com> wrote in message
news:(E-Mail Removed)...
> Can anyone point me to a code snippet I could use to run a macro every

time
> the print screen key is pushed (after allowing the normal printscreen
> function of capturing whatever is onscreen as an image)? Basically I want

to
> automate pasting the new image and doing some other stuff, but I want tit

to
> be dependent on the printscreen key.... also, I'd like this to occur even

if
> Excel is not the active window/application, just as long as it is open.
>
> Is this possible, and if so, can anyone point me to examples of how to do
> it?
>
> Thanks!
> Keith
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Intercept ShutDown Event in C# ? Problem with error code 0xC000014 Milan Microsoft C# .NET 13 1st Jun 2010 09:57 PM
PrintScreen in XP-Pro Michael Hobbs Windows XP Basics 8 10th Nov 2005 02:36 PM
how to capture printscreen & alt-printscreen keystrokes Segfahlt Microsoft C# .NET 1 12th Mar 2004 02:29 AM
Re: PrintScreen Bruce Chambers Windows XP General 0 29th Aug 2003 03:31 PM
Re: PrintScreen Rob Schneider Windows XP General 0 29th Aug 2003 09:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:05 PM.