You could just add code to the _KeyPress event and trap for undesireable
characters before they get in.

VB Code:
  1. Private Sub txtIPAddress_KeyPress(KeyAscii As Integer)
  2.    
  3.     Select Case KeyAscii
  4.         Case 46, 48 To 57, 8 'Numbers, decimal, and backspace only
  5.         Case Else
  6.             Beep
  7.             KeyAscii = 0 'Cancels the keypressed character
  8.     End Select
  9.  
  10. End Sub