Dim strKey As String
Dim strAscii As String
Private Sub cmdChart_Click()
'Open the chart form
frmChart.Show
End Sub
Private Sub cmdGen_Click()
' Unload all forms
Unload frmChart
Unload frmASCII
End Sub
Private Sub Picture1_Click()
Shell "start mailto:cjsa@ns.sympatico.ca?Subject=ASCIICodeGenerator"
End Sub
Private Sub txtKey_KeyPress(KeyAscii As Integer)
' If text boxes contain any data, clear them
If txtKey.Text <> "" And txtAscii.Text <> "" Then
txtKey = "": txtAscii = ""
End If
' strAscii holds the ASCII value of the key pressed
strAscii = KeyAscii
' txtAscii box displays the ASCII code
txtAscii.Text = strAscii
' Check for non display keys
Select Case strAscii
Case 13
' If enter ket was pressed
txtKey.Text = "Enter"
Case 8
' If backspace key was pressed
txtKey.Text = "BackSpace"
Case 27
' If Esc key was pressed
txtKey.Text = "Esc"
Case 32
'If spacebar was pressed
txtKey.Text = "SpaceBar"
End Select
End Sub