Click here to Skip to main content
16,019,768 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am trying to create a IP address input text box just like the one they have it with the windows.

when a user presses decimal key (.) it should tab and go to the next
textbox.

who do i go about doing this using Visual C#

Thanks in advance :)
Posted

Handle the key down event.
Every time a . is pressed, tab to the next through code.

This can be done using the SendKeys method.
 
Share this answer
 
1) This is already done, only press TAB, not dot. If you cause the users to hit dot, they'll hate it. This is not the best option. See below to a better one.

2) IP address is too easy to play with four text boxes. Use System.Windows.Forms.MaskedTextBox which looks like it was specially designed to edit IP addresses!

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900