KeyDown/Key Preview...

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 17
Reputation: JaedenRuiner is an unknown quantity at this point 
Solved Threads: 0
JaedenRuiner JaedenRuiner is offline Offline
Newbie Poster

KeyDown/Key Preview...

 
0
  #1
Sep 7th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 322
Reputation: Hamrick will become famous soon enough Hamrick will become famous soon enough 
Solved Threads: 33
Hamrick's Avatar
Hamrick Hamrick is offline Offline
Posting Whiz

Re: KeyDown/Key Preview...

 
0
  #2
Sep 7th, 2007
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.
The truth does not change according to our ability to stomach it.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 17
Reputation: JaedenRuiner is an unknown quantity at this point 
Solved Threads: 0
JaedenRuiner JaedenRuiner is offline Offline
Newbie Poster

Re: KeyDown/Key Preview...

 
0
  #3
Sep 7th, 2007
Originally Posted by Hamrick View Post
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 322
Reputation: Hamrick will become famous soon enough Hamrick will become famous soon enough 
Solved Threads: 33
Hamrick's Avatar
Hamrick Hamrick is offline Offline
Posting Whiz

Re: KeyDown/Key Preview...

 
0
  #4
Sep 7th, 2007
Well, that appears to be a lie to me then.
If that's how you feel, who am I to disagree?
The truth does not change according to our ability to stomach it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC