Banjo
07-20-2001, 05:31 AM
Does anyone have any ideas about how to emulate Microsoft's IP Address input box as seen in the TCP/IP properties sheet? I have tried a maskEdit box but can not seem to find a valid mask.
IP Address InputBanjo 07-20-2001, 05:31 AM Does anyone have any ideas about how to emulate Microsoft's IP Address input box as seen in the TCP/IP properties sheet? I have tried a maskEdit box but can not seem to find a valid mask. Derek Stone 07-20-2001, 07:10 PM Use four textboxes that only except numeric input. Then use three labels for the periods. If you need more info write back. Good Luck -cl Banjo 07-23-2001, 02:55 AM Yeah, thats the work around solution that I am currently using. What I meant was the one that looks like a single textbox with three periods at fixed points inside it. Any ideas on that one? Derek Stone 07-23-2001, 08:40 AM Here, I'll try to explain better. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'TEXTBOX LABEL TEXTBOX LABEL TEXTBOX LABEL TEXTBOX' <---------- All inside a picturebox ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' This IS how Microsoft does it in the TCP/IP Properties window. Those "fixed" periods are not in the textbox, they're in labels. The textboxes would have a borderstlye of 0 (none) and so would the labels. If you need help with the code write back. Good Luck -cl Banjo 07-23-2001, 10:07 AM Oh, I see. Your first post didn't mention the picbox. Cheers mate. Derek Stone 07-23-2001, 05:45 PM Yeah, I apologize for not being clear enough. Good Luck -cl Laurent 07-24-2001, 08:53 AM you can also use a simple text box and put this code in the keypress event Private Sub txtIP_KeyPress(KeyAscii As Integer) 'enable all non-numeric keys Select Case KeyAscii Case 48 To 57 'these are numbers Case Else 'not unmbers so delete KeyAscii = 0 End Select 'then you add your "-" for the mask select case len(trim(txtIP.text)) case 3,7,11 txtIP.text=txtIP.text & "." end select End Sub but this is only good if your in a network where all the 4 part got 3 digits notes: -set the maxlenght -check to make sure all the parts are under 256 I'll be among the best soon, very soon!!! |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum