Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB 2005 Masked Text Box IP Address

Posted on 2006-10-30
4
Medium Priority
?
2,610 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 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