Label 'Required by the Windows Form Designer Private components As System. Container 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer.
Text Changed End Sub Public Sub Text Box1_Validating(By Val sender As Object, _ By Val e As System.
You can't really do so without using unmanaged code if the user is going to use that Close button.
Printing Public Class Main Class Shared Sub Main() Dim form1 As Form = New Form1() Application. Initialize Component() 'Add any initialization after the Initialize Component() call End Sub 'Form overrides dispose to clean up the component list.
New() 'This call is required by the Windows Form Designer.
Here you must use explicit validation since user is not locked to a control until valid data is given.