|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Prompting for an IP addressIs there a built-in text box for obtaining IP addresses as in the way
Windows prompts for in the Network Config screens? -- ______ ___ __ /_ __/_ __/ _ )_______ ___ _/ /_____ ____ / / / // / _ / __/ -_) _ `/ '_/ -_) __/ /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ /___/ There are 10 types of people in this world; those who understand the binary numbering system and those who don't. There's no place like 127.0.0.1. ASCII a silly question, get a silly ANSI. There is none that i know of, however, you can just put a textbox for the
user to input the IP in, put a restriction on how many characters they can input, then use the following code to parse it to an IPAddress object 2003: Dim ip As IPAddress = DNS.Resolve(Me.TextBox1.Text).AddressList(0) 2005: Dim ip As IPAddress = DNS.GetHostEntry(Me.TextBox1.Text).AddressList(0) hope this helps -- -iwdu15 In 2005 the MaskedTextbox is back, you could use that one.
Greetz, Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "iwdu15" <jmmgoalsteratyahoodotcom> schreef in bericht news:F569EFAD-01C1-4E89-8733-D2978820AADC@microsoft.com... > There is none that i know of, however, you can just put a textbox for the > user to input the IP in, put a restriction on how many characters they can > input, then use the following code to parse it to an IPAddress object > > 2003: > > Dim ip As IPAddress = DNS.Resolve(Me.TextBox1.Text).AddressList(0) > > 2005: > > Dim ip As IPAddress = DNS.GetHostEntry(Me.TextBox1.Text).AddressList(0) > > > hope this helps > -- > -iwdu15 Peter Proost wrote:
> In 2005 the MaskedTextbox is back, you could use that one. Thanks, I've been playing with this control but can't get it to work as one might expect e.g. I can use the mask "000.000.000.000" and this allows an IP address which has 4 lots of 3 digits but it doesn't allow you to enter any IP address which has less than 3 digits in any of its sections e.g. 66.102.7.99 (Google). Any tips? -- ______ ___ __ /_ __/_ __/ _ )_______ ___ _/ /_____ ____ / / / // / _ / __/ -_) _ `/ '_/ -_) __/ /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ /___/ There are 10 types of people in this world; those who understand the binary numbering system and those who don't. There's no place like 127.0.0.1. ASCII a silly question, get a silly ANSI. Hi maybe this will help you:
http://groups.google.be/group/microsoft.public.dotnet.languages.vb/msg/3d7c2 40123fc8def Greetz, Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "TyBreaker" <tybreakerNO@SPAMhotmail.com> schreef in bericht news:#UZ6rz56GHA.4568@TK2MSFTNGP02.phx.gbl... > Peter Proost wrote: > > In 2005 the MaskedTextbox is back, you could use that one. > > Thanks, I've been playing with this control but can't get it to work as > one might expect e.g. I can use the mask "000.000.000.000" and this > allows an IP address which has 4 lots of 3 digits but it doesn't allow > you to enter any IP address which has less than 3 digits in any of its > sections e.g. 66.102.7.99 (Google). Any tips? > > -- > ______ ___ __ > /_ __/_ __/ _ )_______ ___ _/ /_____ ____ > / / / // / _ / __/ -_) _ `/ '_/ -_) __/ > /_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/ > /___/ > > There are 10 types of people in this world; those who understand the > binary numbering system and those who don't. > > There's no place like 127.0.0.1. > > ASCII a silly question, get a silly ANSI.
Experience Request: GPS Application
How to prevent Pasting into textbox? What is the optimal way to upload 10,000 records to Oracle DB? Multi-dimensional array - Question on Data types How do I replace unwanted characters from a string using Reg Exp? Memory problem with vb.net + webServices + DLL Tab groups in VB2003 debugging Connect to the right SQL Server during runtime Access DB on a pocket PC How can I get the data type of a data table's columns? |
|||||||||||||||||||||||