Hola no lo probe pero creo que no tengas problemas es algo sencillo


Private Sub txt1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt1.KeyPress
...