Solved

TabStop Problem

Posted on 2011-09-27
3
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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