943,945 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 10677
  • VB.NET RSS
Sep 7th, 2007
0

KeyDown/Key Preview...

Expand Post »
Okay,

How do I make MainFormKeyDown absolute GOD over everything else? I have a tabpage control, and I want CTRL+Tab to ALWAYS switch tabs. But several tabs have a Multiline edit controls that "WantTabs". I added into the EditKeyDown a handler for "Shift+Tab" to make it go back from a previous tab. But no matter what I do in the MainFormPreviewKeyDown, MainFormKeyDown, or InputEditKeyDown, I never receive any signals for Ctrl+Tab. WTF? Is KeyPreview = True a Lie, because it sure seems that way on my end.

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JaedenRuiner is offline Offline
17 posts
since Aug 2007
Sep 7th, 2007
0

Re: KeyDown/Key Preview...

Quote ...
Is KeyPreview = True a Lie, because it sure seems that way on my end.
It's not a lie, but you might be confused about when and how a control captures key strokes. I think you want a global winndows hook. Here's another link.
Reputation Points: 180
Solved Threads: 34
Posting Whiz
Hamrick is offline Offline
322 posts
since Jun 2007
Sep 7th, 2007
0

Re: KeyDown/Key Preview...

Click to Expand / Collapse  Quote originally posted by Hamrick ...
It's not a lie, but you might be confused about when and how a control captures key strokes. I think you want a global winndows hook
Well, that appears to be a lie to me then.

MainForm.KeyPreview is a binary equation.
1: Either it Previews EVERY key
or
2: It doesn't.

If it doesn't then it's a lie, and doesn't do what it says it should do.

In Delphi when you have keypreview for the main form it receives EVERY key code before any other control in the application. That's what "KeyPreview" means. But I guess I shouldn't be surprised, since KeyPreview has never worked for VBA ever, so why should they fix it now. *shrug*

A global windows hook is a bit overkill, because i'm not trying to link a key command into the system, just into my application.

*shrug*

Jaeden "Sifo Dyas" al'Raec Ruiner
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JaedenRuiner is offline Offline
17 posts
since Aug 2007
Sep 7th, 2007
0

Re: KeyDown/Key Preview...

Quote ...
Well, that appears to be a lie to me then.
If that's how you feel, who am I to disagree?
Reputation Points: 180
Solved Threads: 34
Posting Whiz
Hamrick is offline Offline
322 posts
since Jun 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Cancel Button
Next Thread in VB.NET Forum Timeline: How do I design custom installation in vb.net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC