all groups > dotnet windows forms > july 2004 >
You're in the

dotnet windows forms

group:

How to cancel Ctr+Tab on TabControl?


Re: How to cancel Ctr+Tab on TabControl? Mick Doherty
7/16/2004 12:31:30 PM
dotnet windows forms:
A vb.net solution:
\\\
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, _
ByVal keyData As Keys) As Boolean
If TypeOf ActiveControl Is TabControl Then
If keyData = (Keys.Control Or Keys.Tab) Then
Return True
End If
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
///
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


[quoted text, click to view]


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004

How to cancel Ctr+Tab on TabControl? TK
7/16/2004 8:00:15 PM
I'm building an Wizard style Win Form application. And am using TabControl
to design and run the subsequent pages (actually 6 pages to finish the
Wizard).

Because it's an Wizard application, it shouldn't allow user to go next page
while required text boxes are blank. To accomplish this, I timidly examine
such required fields and then control the NextButton.Enabled property in
each pages. I know it may not be a smart way but is the only way known by me
now. My wizard works fine excepting one point.

TabControl itself has built-in Short Cut Key feature which changes the
current TabPage by CTR+Tab key. I want to cancel this short cut event but
don't know how.

How can I cancel such key event?
Please help me.

TK
AddThis Social Bookmark Button