Solved

TabStop Problem

Posted on 2011-09-27
3
256 Views
Last Modified: 2012-05-12
I'm using the following code to allow the arrow keys (right, left) to act as tab / shift+tab:

Protected Overrides Function ProcessKeyPreview(ByRef m As System.Windows.Forms.Message) As Boolean
        Const WM_KEYDOWN As Integer = &H100
        If m.Msg = WM_KEYDOWN Then
            Select Case m.WParam.ToInt32
                Case Keys.Right, Keys.Left
                    Me.SelectNextControl(Me.ActiveControl, (m.WParam.ToInt32 = Keys.Right), True, True, True)
                    Return True
            End Select
        End If
    End Function

The problem is the focus moves from a button (either forward or backward) to the next tab index although that control's TabStop property is set to False. The problem does not occur when the focus moves from textbox to textbox or button to button. The tabStopOnly As Boolean condition is set to True.

Any ideas on how to correct the problem?
0
Comment
Question by:Tim313
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
Ambusy earned 500 total points
ID: 36709001
I use the SENDKEYS [tab] and candel the current keystroke. Then VB takes over as if I types a tab
0
 
LVL 4

Expert Comment

by:Ambusy
ID: 36709012
0
 

Author Closing Comment

by:Tim313
ID: 36709145
Thanks for your response. I had already used the SendKey.Send as a work around the problem. I was just hoping someone could explain why the "tabStopOnly condition was not working...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now