A Limitation That Works To Our Benefit
According to the MSDN documentation, "the RegisterHotKey function defines a system-wide hot key." Furthermore "the system posts the WM_HOTKEY message to the message queue of the window with which the hot key is associated." So what does that mean to you?
Whenever anything happens in Windows, messages are generated. Applications respond to these messages either by handling them or surfacing them as events for developers. That's how Notes uses Ctrl+A to select all the documents in a view, but when a user double-clicks on a document you have an event you can program. It's all about the messages, and who handles them.
In some other development environments you can create your own message handler, or hook. Notes doesn't allow you do that kind of low-level integration, and while that's frustrating for me in this case that works to our benefit! All you have to do is reset the Print Screen key so it gets directed to Notes. Notes isn't programmed to be aware of the message so it gets ignored. The end result is the Print Screen gets pressed and absolutely nothing happens.
provided by Julian Robichaux at nsftools.com.
Come on... you knew it couldn't be all good. :-) While this code in active Print Screen is disabled SYSTEM WIDE. Here I have it enabled in a form's QueryOpen, but you could do some tests, say for $KeepPrivate or check user roles, to enable it selectively. (Yes, I know end users can remove $KeepPrivate.) If I put this into production I would be nice and actually tell them that Print Screen is disabled, though. I'll leave that as an exercise for the reader.
Sources: Digital Inspiration blog
Answers.Com RegisterHotKey sample
[Update 5/16/08 - Removed two unused constants]