Solved

VB 2005 Masked Text Box IP Address

Posted on 2006-10-30
4
2,568 Views
Last Modified: 2008-01-09
Hi

I would like to use the MaskedTextBox control to enter and IP address.

The custom works fine for 3 digits ie 255.255.255.255 but not for less ie 10.10.0.1

Thanks

0
Comment
Question by:weight01
[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
4 Comments
 
LVL 6

Accepted Solution

by:
yhwhlivesinme earned 500 total points
ID: 17836167
I think it's 999.999.999.999 the 9 represents an optional character, you might be able to get clever and say: 099.099.099.099 so you are requiring at least one character.  See http://www.experts-exchange.com/Databases/MS_Access/Q_20830767.html for how other people do it....sometimes it's good to seperate the four groups of characters so you can validate them seperately and then you can concatonate them later
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17836168
doesn't it work if you put MaskedTextBox1.Mask = "999-999-999-999"? sorry i haven't much experience with textbox masks but according to this link: http://msdn2.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.mask.aspx
the 9 is for an optional digit...

NY
0
 
LVL 10

Expert Comment

by:gangwisch
ID: 17836297
i found this site relating to your question asked:
http://www.vbforums.com/showthread.php?t=429940
it gives you the source for creating your own textbox into an ip address maskbox.
0
 
LVL 1

Author Comment

by:weight01
ID: 17836517
Thanks all

I think i will go for the 4 groups.

gangwisch - that code almost worked except you can enter 4 characters into the first section - thanks for your help anyway.

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

622 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