[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Masked Edit Control in VB

Posted on 1999-10-29
2
Medium Priority
?
221 Views
Last Modified: 2013-12-25
I want to use the Masked Edit Control in VB as an IP Address control made for VC++, can anyone tell me how could I use it and can send code for it..
0
Comment
Question by:vipin072998
2 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 600 total points
ID: 2168650
To use the masked edit control to get an IP address:

MaskEdBox1.Mask="###.###.###.###"
MaskEdBox1.MaxLength=15

The IP address will be in:

MaskEdBox1.Text

To further validate, you should make sure that each octet of the ipaddress is less than or equal to 255

256.256.256.256 is not a valid IP address..

Cheers!
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2179604
Just a thought, you could use the common controls replacement control IP Address for this. It is available to download free from http://www.mvps.org/ccrp/

This already has the masking and the checking for <=255 included.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

640 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