Protected Overloads Overrides Sub Dispose(By Val disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components. Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System. IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. Key Press Dim Key Ascii As Integer Key Ascii = Asc(e. You need a minimum screen resolution of about 700 pixels width to see our exercises.
The value would always be returned in the base unit.
Means if the user enters one of the additional units the value in the text box will be multiplied with the factor and set as value.
Let's say you are defining a base unit string like 'inch'.
And additional units strings with a factor like 'cm' 1/2.54.
Select Case Key Ascii Case 48 To 57 Case Else 'provide no handling for any other keys Key Ascii = 0 Msg Box("You must enter a positive integer") End Select ' Reset the flag so other Text Changed events are processed correctly.