Link to home
Start Free TrialLog in
Avatar of W_Fox
W_Fox

asked on

Add "PrintScreen" to available hotkeys - how?

Hello, all,
problem: I'm writing some sort of advanced printscreen application. This, itself, is not a problem; problem is, that I'd like to provide possibility to provide _configurable_ hot key for this task, and it should include 'PrintScreen' as well. For example, if user hits Ctrl+PrintScreen, this combination is displayed in THotKey box and can be assigned to hotkey or shortcut (currently I'm using TfisHotKey component). It does not happen, seems, that application does not even receive printscreen key.

I did some Google'ing and found a sample, how to register and trap PrintScreen in the application along with modifiers, but how to add PrintScreen to normal hot key processing?

I'm trying to get this done in Delphi 5, if it is important.

Best regards and thanks in advance,
  W_Fox

p.s. I just hope, that question is understandable :).
Avatar of vadim_ti
vadim_ti

if i understood your question,

to receive Ctrl+PrintScreen
you need to assign VK_SNAPSHOT+$4000 to key property of TfisHotKey component

Avatar of W_Fox

ASKER

vadim_ti,
half of work done, thanks. Now the tricky part - how to provide possibility to configure this using THotKey component (or other, freeware, if there's some) - including displaying of shortcut text? User should be able to change this as well, and he/she even might want to override default PrtScr or Alt-PrtScr functionality, or assign these keys to perform another actions.

Regards,
  W_Fox
ASKER CERTIFIED SOLUTION
Avatar of vadim_ti
vadim_ti

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
Avatar of W_Fox

ASKER

Hi,
sorry for long silence.

This is not exactly what I was looking for :(. The best would be to alter menus.pas and comctrls.pas (these two seem to be responsible for THotKey and TShortCut) to implement usage of PrintScreen, so, it would behave like any other key => one solution for all important events in life :). Is it possible? If it is - I'd like to know, how :)

Regards,
  W_Fox
_______________________________
SOLUTION
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
i think it is never good to change menus.pas or comctrls.pas because maintenance problems
(delphi updates, new version or even reinstall delphi on your computer, impossibilte to work with
runtime packages and so on)
Avatar of W_Fox

ASKER

Hello,
sorry for long silence - deadlines were coming [and project in question was not related to them :)].

So, I didn't completely got the solution I was looking for, but vadim_ti and DragonSlayer, I believe that both your comments will be helpful, when I get time to use them :).

Thanks,
  W_Fox