here you go.. you owe me a cookie
VB Code:
  1. Private Sub CheckForPeriod(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtIP1.KeyPress, txtIP2.KeyPress, txtIP3.KeyPress, txtIP4.KeyPress
  2.         'CHECK FOR A "."
  3.         If e.KeyChar = "."c Then
  4.             'SET HANDLED TO TRUE SO THE "." IS NOT PROCESSED
  5.             e.Handled = True
  6.             'SEND THE TAB KEY TO GO TO THE NEXT CONTROL
  7.             Me.ProcessTabKey(True)
  8.         End If
  9.     End Sub
you will notice this routine does the following
1) checks for a . being entered in any of the 4 IP boxes (notice this routine HANDLES 4 different keypress events - one from each IP box)
2) sets handled to true so a . doesn't come up in the textbox
3) sends a tab keypress to the form which will send focus to the next item in the taborder