-1

I need a program to respond while not active/not selected by user or minimized to KeyCodes. Anyone got ideas? In VB.NET.

Frosty Tosty
  • 63
  • 1
  • 8

1 Answers1

2

This won't work out of the box as key messages are only sent to the active window. A minimized window is never active.

What you could try is register system-wide hotkeys. You could also try to install a keyboard hook, however, this would affect the entire system and your application would receive all the keystrokes performed. This would require efficient filtering.

Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139
  • I didn't say you did :-) But someone did and I *hate* people not commenting on why they downvote. – Thorsten Dittmar Nov 10 '14 at 15:46
  • @ThorstenDittmar not my downvote either, but you do realise that there is no obligation for the voter to comment, don't you? –  Feb 20 '15 at 01:39
  • @SabreTooth Yes, of course I realize that, but I think it's rude anyway. That's also one thing I don't like about SO. It just shouldn't be possible to downvote without commenting. If I downvote an answer I have good reason to do so. Such critique could be used to improve the answer or have it deleted (improves quality). It's happened I downvoted answers and provided a reason why, only to find (upon other people's comments) that I misunderstood the answer. I just can't see any reason why you should be able to downvote without commenting at all, as it discredits an answer without good reason. – Thorsten Dittmar Feb 20 '15 at 07:51
  • Enforcing downvote-comments have been discussed too many times on the various metas and thoroughly rejected. It just boils down to a) you can't force people to comment and b) if for downvotes, should also be for upvotes –  Feb 20 '15 at 07:55
  • I don't mean to start a new discussion here, but just let me comment on a) and b). As for a) people are forced to provide a reason for close-voting questions, too. Why is this then? And for b) to me an upvote is equivalent to saying "This is a good answer". If you said this in a real-world conversation, nobody would ask why. If you said "This is a bad answer" (and that is what a downvote says), the natural question is to ask why. But that's just my two ct. – Thorsten Dittmar Feb 20 '15 at 08:03