Hello,
I have a textBox1.text that I would like to have it insert a . every three characters.
For an IP Address, like 192.168.001.016
private void tbIPVM_TextChanged(object sender, EventArgs e)
{
if (tbIPVM.Text.Length > 12)
{
button6.Enabled = true;
}

1 answers
if this is for the web you can use the ajax toolkit and use the textbox formatter to achieve this.
if you're using windows you can use an ip address control I wrote: http://sanity-free.org/127/an_ipaddress_control_the_win32_sysipaddress32_control_in_csharp.html or you can use a masked text box.
answered 2 years ago by:
2309