Solved

TabStop Problem

Posted on 2011-09-27
3
247 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
Comment Utility
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
Comment Utility
0
 

Author Closing Comment

by:Tim313
Comment Utility
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 Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 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

11 Experts available now in Live!

Get 1:1 Help Now