Home All Groups Group Topic Archive Search About

format textbox for ip-address.

Author
26 Feb 2007 3:22 AM
Zairay
Hi All,

I have a textbox in VB for which I want to make a format so that the
user can add an IP-address.
When the form is openend the user should see (   .   .   .   ) in the
textbox and only have the possibility to add numbers. I haven't found
any code that does that.

Regards

Marco

Author
26 Feb 2007 7:51 AM
J French
On 25 Feb 2007 19:22:47 -0800, Zai***@gmail.com wrote:

>Hi All,
>
>I have a textbox in VB for which I want to make a format so that the
>user can add an IP-address.
>When the form is openend the user should see (   .   .   .   ) in the
>textbox and only have the possibility to add numbers. I haven't found
>any code that does that.
>
>Regards
>
>Marco

Having fun out there ?

Use four Textboxes, much easier.
Also make 'em a Control Array and ideally hide the thing in a
UserControl.
Author
26 Feb 2007 8:12 AM
Rick Rothstein (MVP - VB)
Show quote Hide quote
>>I have a textbox in VB for which I want to make a format so that the
>>user can add an IP-address.
>>When the form is openend the user should see (   .   .   .   ) in the
>>textbox and only have the possibility to add numbers. I haven't found
>>any code that does that.
>>
>>Regards
>>
>>Marco
>
> Having fun out there ?
>
> Use four Textboxes, much easier.
> Also make 'em a Control Array and ideally hide the thing in a
> UserControl.

Another possibility is to use a Masked Edit Control (although the input
mechanism for the user might feel sloppier with it).

Rick
Author
26 Feb 2007 10:40 AM
Zairay
On 26 feb, 12:12, "Rick Rothstein \(MVP - VB\)"
<rickNOSPAMn...@NOSPAMcomcast.net> wrote:
Show quoteHide quote
> >>I have a textbox in VB for which I want to make a format so that the
> >>user can add an IP-address.
> >>When the form is openend the user should see (   .   .   .   ) in the
> >>textbox and only have the possibility to add numbers. I haven't found
> >>any code that does that.
>
> >>Regards
>
> >>Marco
>
> > Having fun out there ?
>
> > Use four Textboxes, much easier.
> > Also make 'em a Control Array and ideally hide the thing in a
> > UserControl.
>
> Another possibility is to use a Masked Edit Control (although the input
> mechanism for the user might feel sloppier with it).
>
> Rick

No, ain't having fun. Time to go home again, some 30 dys and I out of
here.

What control do I need for this Masked Edit Control

Regards
Marco
Author
26 Feb 2007 3:08 PM
Rick Rothstein (MVP - VB)
>> Another possibility is to use a Masked Edit Control (although the input
>> mechanism for the user might feel sloppier with it).
>
> What control do I need for this Masked Edit Control

Uh, how about the Masked Edit Control itself?

I'm guessing you don't know where that one is. Key in Ctrl+T (or select
Project/Components from VB's menu) and find

    Microsoft Masked Edit Control

in the list that appears, place a checkmark in the box next to it and press
OK. This will add the control to your toolbox... it's icon looks like this

#.#|

Add it to your form and then press F1 to get help on how to use it.

Rick