?
Solved

TabStop Problem

Posted on 2011-09-27
3
Medium Priority
?
262 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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