-2

Is there any way I can stop users from tabbing to items on my application using C# winforms? I tried setting their TabIndex to values above 100 but that didnt work, they still acted as if they were the lowest index thats not set.

EDIT

The possible duplicate questions all have TabStop set to false as the answer but not all tools have a tab stop property

Bridge
  • 29,818
  • 9
  • 60
  • 82
WhatsThePoint
  • 3,395
  • 8
  • 31
  • 53
  • Now that you have the how to do it - why would you want to make it harder for users to use your application? – Bridge Apr 20 '17 at 10:30
  • @Bridge its for items i dont want them to tab to like group boxes – WhatsThePoint Apr 20 '17 at 10:31
  • @WhatsThePoint All the property changes are done by code even by the IDE. Check [this answer](http://stackoverflow.com/a/43516946/2408342). – Roshana Pitigala Apr 20 '17 at 10:40
  • @WhatsThePoint - regarding your edit - the question linked is still a duplicate, the answers there also address your question about controls which do not have a `TabStop` property. – Bridge Apr 20 '17 at 11:46
  • @Bridge a different question was originally posted for the duplicatate, a the current one was marked after edit – WhatsThePoint Apr 20 '17 at 12:17
  • 1
    Fine - just checking that you have an answer that works for you! – Bridge Apr 20 '17 at 13:11

2 Answers2

5

Try change the TabStop property to false, or set TabIndex to -1

Milney
  • 6,253
  • 2
  • 19
  • 33
3

Set the TabStop property to false.

tabStop


EDIT

In the case that your tool does not have the TabStop Property you can try doing it by adding this code.

this.button1.TabStop = false;
Roshana Pitigala
  • 8,437
  • 8
  • 49
  • 80