L
LeonCS
Guest
Romeos and Julliets
I have a free little application to share. I realise it is not Christmas or thanksgiving - but decided to publish this anyway. I wanted to learn the Phonetic callsigns, and as I researched it, I became interested in learning morse code as well. The little program I wrote for myself sort of grew and grew to include a points and awarding system as well.
Screenshot 1
Screenshot 2
You need to add 13 buttons, 5 labels, and 1 textbox to a form in the designer. They must all have their Visible property set to False. And add 2 Timers also. Also need to define a string variable named scores in My.Settings
1st half of the code: -
Public Class Form5 learn morse code . . . . Programmer: Leon Stanley 2015
Dim eng(39) As String
Dim mrs(39) As String
Dim sCh(39) As String
Dim sbG() As Integer = {4, 19, 0, 8, 12, 13, 127, 3, 6, 10, 14, 127, 17, 18, 20, 22, 127, _
1, 2, 5, 7, 127, 9, 11, 15, 16, 127, 21, 23, 24, 25, 127, _
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 127, 36, 37, 38, 39, 127}
Dim lst As New List(Of Integer)
Dim scrs(32) As Integer holds scores
Dim fnt(4) As Font
Dim R As New Random
Dim mode, lssn, trial As Integer mode, current lesson, current trial
Dim counter, errors, present, trL, tmrC As Integer
Dim slow() As Single = {4, 5, 4, 3.7} slow benchmark seconds per answer
Dim fast() As Single = {1.6, 2.2, 1.6, 1.4} fast benchmark
Dim plyr As Integer
Dim player As String
Dim sw As New Stopwatch
Dim isTmng, isSvExit As Boolean is timing trial, is to be saved on exit
Dim mPnt As Point mouse point
Private Sub Form5_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
If mode = -1 Then Exit Sub
If isSvExit Then mew()
End Sub
Private Sub Form5_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim I, J, K As Integer
Dim S As String = ""
fnt(0) = New Font("segoe UI", 28, FontStyle.Bold, GraphicsUnit.Pixel)
fnt(1) = New Font("palatino linotype", 28, FontStyle.Regular, GraphicsUnit.Pixel)
fnt(2) = New Font("courier new", 20, FontStyle.Bold, GraphicsUnit.Pixel)
fnt(3) = New Font("palatino linotype", 40, FontStyle.Regular, GraphicsUnit.Pixel)
fnt(4) = New Font("segoe ui", 20, FontStyle.Regular, GraphicsUnit.Pixel)
Dim english As String = "Alfa,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel,India,Juliett," & _
"Kilo,Lima,Mike,November,Oscar,Papa,Quebec,Romeo,Sierra,Tango,Uniform,Victor,Whiskey,Xray,Yankee,Zulu," & _
"Zero,One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Period,Comma,QuestMark,Slash,"
Dim morse As String = ".-,-...,-.-.,-..,.,..-.,--.,....,..,.---," & _
"-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-," & _
"..-,...-,.--,-..-,-.--,--..,-----,.----,..---,...--," & _
"....-,.....,-....,--...,---..,----.,.-.-.-,--..--,..--..,-..-.,"
Dim snglChr As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,?/"
Do Until I = 40
K = english.IndexOf(",", J)
eng(I) = english.Substring(J, K - J)
J = K + 1 : I += 1
Loop
I = 0 : J = 0
Do Until I = 40
K = morse.IndexOf(",", J)
mrs(I) = morse.Substring(J, K - J)
J = K + 1 : I += 1
Loop
For I = 0 To 39
lst.Add(I)
sCh(I) = snglChr.ElementAt(I)
Next
If Not My.Settings.scores.Length = 600 Then initialize .scores on first run instance
For J = 0 To 4
For I = 0 To 19
S &= Chr(127)
Next I
For I = 0 To 99
S &= Chr(48)
Next
Next J
My.Settings.scores = S
End If
Font = fnt(1)
ClientSize = New Size(1000, 800)
Label1.Location = New Point(100, 200)
Label2.Location = New Point(200, 400)
Label2.Text = "Errors = 0 out of 0"
Label3.Location = New Point(650, 215) : Label3.Text = "" : Label3.Font = fnt(2)
Label3.BackColor = Color.LightBlue : Label3.ForeColor = Color.Crimson
Label4.Location = New Point(300, 300)
Label5.Location = New Point(200, 350) : Label5.BackColor = Color.LightBlue
TextBox1.Location = New Point(300, 200) : Label4.BackColor = Color.Goldenrod
Text = "Learn Morse Code"
Timer1.Interval = 20 : Timer2.Interval = 20
Button1.Text = "Lesson 1" : Button2.Text = "Lesson 2" : Button3.Text = "Lesson 3" : Button4.Text = "Lesson 4"
Button5.Text = "Lesson 5" : Button6.Text = "Lesson 6" : Button7.Text = "Lesson 7" : Button8.Text = "Lesson 8"
Button10.Text = "Trial 1: Phonetic >>> Morse" : Button11.Text = "Trial 2: Morse >>> Phonetic "
Button12.Text = "Trial 3: Character >>> Morse" : Button13.Text = "Trial 4: Morse >>> Character"
Button9.Text = " <<< Back"
Button1.Location = New Point(30, 73) : Button2.Location = New Point(30, 173) : Button3.Location = New Point(30, 255)
Button4.Location = New Point(30, 337) : Button5.Location = New Point(30, 419) : Button6.Location = New Point(30, 501)
Button7.Location = New Point(30, 609) : Button8.Location = New Point(30, 708)
Button10.Location = New Point(300, 200) : Button11.Location = New Point(300, 300)
Button12.Location = New Point(300, 400) : Button13.Location = New Point(300, 500)
mode = -1
FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
CenterToScreen()
End Sub
Private Sub Form5_MouseClick(sender As Object, e As MouseEventArgs) Handles Me.MouseClick
If Not mode = -1 Then Exit Sub
Dim I, J, K As Integer
Dim S, T As String
If mPnt.X < 300 Or mPnt.X > 700 Then Exit Sub
If mPnt.Y < 200 Or mPnt.Y > 699 Then Exit Sub
If (mPnt.Y Mod 100) > 80 Then Exit Sub
I = CInt(Int((mPnt.Y - 200) / 100))
If e.Button = Windows.Forms.MouseButtons.Right Then
If My.Settings.scores.ElementAt(I * 120) = Chr(127) Then Exit Sub
this is where we delete an existing player
If MessageBox.Show("Are you sure you want to delete this player?", "Please confirm Deletion", _
MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = Windows.Forms.DialogResult.Yes Then
S = ""
For J = 0 To 19
S &= Chr(127)
Next
For J = 0 To 99
S &= Chr(48)
Next
My.Settings.scores = My.Settings.scores.Remove(I * 120, S.Length)
My.Settings.scores = My.Settings.scores.Insert(I * 120, S)
Invalidate()
End If
Else
If My.Settings.scores.ElementAt(I * 120) = Chr(127) Then
this is where we enter a new player
S = InputBox("Please type in a name - - max 19 characters.", "Name of new player", "")
If S.Replace(" ", "") = "" Or S.Replace(" ", "") = "..free.." Then Exit Sub
If S.Length > 19 Then Exit Sub
For K = 0 To 480 Step 120
J = K : T = ""
Do Until My.Settings.scores.ElementAt(J) = Chr(127)
T &= My.Settings.scores.ElementAt(J)
J += 1
Loop
If S = T Then Exit Sub
Next
My.Settings.scores = My.Settings.scores.Remove(I * 120, S.Length)
My.Settings.scores = My.Settings.scores.Insert(I * 120, S)
Invalidate()
Else
this is where we select a player and start game
plyr = I
J = I * 120 : player = ""
Do Until My.Settings.scores.ElementAt(J) = Chr(127)
player &= My.Settings.scores.ElementAt(J)
J += 1
Loop
K = 0
For J = I * 120 + 24 To I * 120 + 117 Step 3
scrs(K) = CInt(My.Settings.scores.Substring(J, 3))
K += 1
Next
scrs(32) = CInt(My.Settings.scores.Substring(I * 120 + 20, 4))
mode = 0
mde()
End If
End If
End Sub
Private Sub Form5_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
If Not mode = -1 Then Exit Sub
mPnt = e.Location
End Sub
Private Sub Form5_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
e.Graphics.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit
Dim I, J, K As Integer
Select Case mode
Case -1
e.Graphics.DrawString("Click on a ..free.. listing to start a new player.", fnt(4), Brushes.Blue, 30, 30)
e.Graphics.DrawString("RightMouseClick on an existing player to delete.", fnt(4), Brushes.Blue, 30, 60)
e.Graphics.DrawString("Click on an existing player to select and begin play.", fnt(4), Brushes.Blue, 30, 90)
e.Graphics.DrawString("There are only five player slots available.", fnt(4), Brushes.Blue, 30, 120)
Using grbrsh As New Drawing2D.LinearGradientBrush(New Point(250, 500), New Point(750, 500), Color.Gold, Color.Goldenrod)
For I = 200 To 600 Step 100
e.Graphics.FillRectangle(grbrsh, 300, I, 400, 80)
Next
End Using
J = 220
For I = 0 To 480 Step 120
If Asc(My.Settings.scores.ElementAt(I)) = 127 Then
e.Graphics.DrawString("..free..", fnt(0), Brushes.DodgerBlue, 320, J)
e.Graphics.DrawString(My.Settings.scores.Substring(I + 20, 4), fnt(0), Brushes.DodgerBlue, 600, J)
Else
K = My.Settings.scores.IndexOf(Chr(127), I)
e.Graphics.DrawString(My.Settings.scores.Substring(I, K - I), fnt(0), Brushes.Blue, New Rectangle(320, J, 290, 40)) 320, J)
e.Graphics.DrawString(My.Settings.scores.Substring(I + 20, 4), fnt(0), Brushes.Blue, 600, J)
End If
J += 100
Next
e.Graphics.DrawString("-- --- .-. ... . .-- .- ... .- --. --- --- -.. -- .- -.", fnt(0), Brushes.Blue, 30, 750)
Case 0
e.Graphics.DrawString("Memorize the appropriate Morse codes before starting each lessson.", fnt(4), Brushes.Blue, 30, 10)
e.Graphics.DrawString("Points", fnt(2), Brushes.Crimson, 912, 30)
e.Graphics.DrawString(eng(4), fnt(1), Brushes.Black, 180, 56)
e.Graphics.DrawString(mrs(4), fnt(0), Brushes.Blue, 280, 56)
e.Graphics.DrawString(eng(19), fnt(1), Brushes.Black, 380, 56)
e.Graphics.DrawString(mrs(19), fnt(0), Brushes.Blue, 480, 56)
e.Graphics.DrawString(eng(0), fnt(1), Brushes.Black, 180, 98)
e.Graphics.DrawString(mrs(0), fnt(0), Brushes.Blue, 280, 98)
e.Graphics.DrawString(eng(8), fnt(1), Brushes.Black, 380, 98)
e.Graphics.DrawString(mrs(8), fnt(0), Brushes.Blue, 480, 98)
e.Graphics.DrawString(eng(12), fnt(1), Brushes.Black, 580, 98)
e.Graphics.DrawString(mrs(12), fnt(0), Brushes.Blue, 680, 98)
e.Graphics.DrawString(eng(13), fnt(1), Brushes.Black, 780, 98)
e.Graphics.DrawString(mrs(13), fnt(0), Brushes.Blue, 920, 98)
e.Graphics.DrawString((scrs(0) + scrs(1) + scrs(2) + scrs(3)).ToString("000"), fnt(2), Brushes.Crimson, 950, 80)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 149, 960, 149)
e.Graphics.DrawString(eng(3), fnt(1), Brushes.Black, 180, 178)
e.Graphics.DrawString(mrs(3), fnt(0), Brushes.Blue, 280, 178)
e.Graphics.DrawString(eng(6), fnt(1), Brushes.Black, 380, 178)
e.Graphics.DrawString(mrs(6), fnt(0), Brushes.Blue, 480, 178)
e.Graphics.DrawString(eng(10), fnt(1), Brushes.Black, 580, 178)
e.Graphics.DrawString(mrs(10), fnt(0), Brushes.Blue, 680, 178)
e.Graphics.DrawString(eng(14), fnt(1), Brushes.Black, 780, 178)
e.Graphics.DrawString(mrs(14), fnt(0), Brushes.Blue, 880, 178)
e.Graphics.DrawString((scrs(4) + scrs(5) + scrs(6) + scrs(7)).ToString("000"), fnt(2), Brushes.Crimson, 950, 184)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 241, 960, 241)
e.Graphics.DrawString(eng(17), fnt(1), Brushes.Black, 180, 260)
e.Graphics.DrawString(mrs(17), fnt(0), Brushes.Blue, 280, 260)
e.Graphics.DrawString(eng(18), fnt(1), Brushes.Black, 380, 260)
e.Graphics.DrawString(mrs(18), fnt(0), Brushes.Blue, 480, 260)
e.Graphics.DrawString(eng(20), fnt(1), Brushes.Black, 580, 260)
e.Graphics.DrawString(mrs(20), fnt(0), Brushes.Blue, 695, 260)
e.Graphics.DrawString(eng(22), fnt(1), Brushes.Black, 780, 260)
e.Graphics.DrawString(mrs(22), fnt(0), Brushes.Blue, 895, 260)
e.Graphics.DrawString((scrs(8) + scrs(9) + scrs(10) + scrs(11)).ToString("000"), fnt(2), Brushes.Crimson, 950, 266)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 323, 960, 323)
e.Graphics.DrawString(eng(1), fnt(1), Brushes.Black, 180, 343)
e.Graphics.DrawString(mrs(1), fnt(0), Brushes.Blue, 280, 343)
e.Graphics.DrawString(eng(2), fnt(1), Brushes.Black, 380, 343)
e.Graphics.DrawString(mrs(2), fnt(0), Brushes.Blue, 480, 343)
e.Graphics.DrawString(eng(5), fnt(1), Brushes.Black, 580, 343)
e.Graphics.DrawString(mrs(5), fnt(0), Brushes.Blue, 680, 343)
e.Graphics.DrawString(eng(7), fnt(1), Brushes.Black, 780, 343)
e.Graphics.DrawString(mrs(7), fnt(0), Brushes.Blue, 880, 343)
e.Graphics.DrawString((scrs(12) + scrs(13) + scrs(14) + scrs(15)).ToString("000"), fnt(2), Brushes.Crimson, 950, 349)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 405, 960, 405)
e.Graphics.DrawString(eng(9), fnt(1), Brushes.Black, 180, 425)
e.Graphics.DrawString(mrs(9), fnt(0), Brushes.Blue, 280, 425)
e.Graphics.DrawString(eng(11), fnt(1), Brushes.Black, 380, 425)
e.Graphics.DrawString(mrs(11), fnt(0), Brushes.Blue, 480, 425)
e.Graphics.DrawString(eng(15), fnt(1), Brushes.Black, 580, 425)
e.Graphics.DrawString(mrs(15), fnt(0), Brushes.Blue, 680, 425)
e.Graphics.DrawString(eng(16), fnt(1), Brushes.Black, 780, 425)
e.Graphics.DrawString(mrs(16), fnt(0), Brushes.Blue, 880, 425)
e.Graphics.DrawString((scrs(16) + scrs(17) + scrs(18) + scrs(19)).ToString("000"), fnt(2), Brushes.Crimson, 950, 431)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 487, 960, 487)
e.Graphics.DrawString(eng(21), fnt(1), Brushes.Black, 180, 508)
e.Graphics.DrawString(mrs(21), fnt(0), Brushes.Blue, 280, 508)
e.Graphics.DrawString(eng(23), fnt(1), Brushes.Black, 380, 508)
e.Graphics.DrawString(mrs(23), fnt(0), Brushes.Blue, 480, 508)
e.Graphics.DrawString(eng(24), fnt(1), Brushes.Black, 580, 508)
e.Graphics.DrawString(mrs(24), fnt(0), Brushes.Blue, 680, 508)
e.Graphics.DrawString(eng(25), fnt(1), Brushes.Black, 780, 508)
e.Graphics.DrawString(mrs(25), fnt(0), Brushes.Blue, 880, 508)
e.Graphics.DrawString((scrs(20) + scrs(21) + scrs(22) + scrs(23)).ToString("000"), fnt(2), Brushes.Crimson, 950, 514)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 569, 960, 569)
e.Graphics.DrawString(eng(26), fnt(1), Brushes.Black, 180, 590)
e.Graphics.DrawString(mrs(26), fnt(0), Brushes.Blue, 250, 590)
e.Graphics.DrawString(eng(27), fnt(1), Brushes.Black, 335, 590)
e.Graphics.DrawString(mrs(27), fnt(0), Brushes.Blue, 405, 590)
e.Graphics.DrawString(eng(28), fnt(1), Brushes.Black, 490, 590)
e.Graphics.DrawString(mrs(28), fnt(0), Brushes.Blue, 560, 590)
e.Graphics.DrawString(eng(29), fnt(1), Brushes.Black, 645, 590)
e.Graphics.DrawString(mrs(29), fnt(0), Brushes.Blue, 720, 590)
e.Graphics.DrawString(eng(30), fnt(1), Brushes.Black, 800, 590)
e.Graphics.DrawString(mrs(30), fnt(0), Brushes.Blue, 870, 590)
e.Graphics.DrawString(eng(31), fnt(1), Brushes.Black, 180, 631)
e.Graphics.DrawString(mrs(31), fnt(0), Brushes.Blue, 250, 631)
e.Graphics.DrawString(eng(32), fnt(1), Brushes.Black, 335, 631)
e.Graphics.DrawString(mrs(32), fnt(0), Brushes.Blue, 405, 631)
e.Graphics.DrawString(eng(33), fnt(1), Brushes.Black, 490, 631)
e.Graphics.DrawString(mrs(33), fnt(0), Brushes.Blue, 566, 631)
e.Graphics.DrawString(eng(34), fnt(1), Brushes.Black, 645, 631)
e.Graphics.DrawString(mrs(34), fnt(0), Brushes.Blue, 715, 631)
e.Graphics.DrawString(eng(35), fnt(1), Brushes.Black, 800, 631)
e.Graphics.DrawString(mrs(35), fnt(0), Brushes.Blue, 870, 631)
e.Graphics.DrawString((scrs(24) + scrs(25) + scrs(26) + scrs(27)).ToString("000"), fnt(2), Brushes.Crimson, 950, 613)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 692, 960, 692)
e.Graphics.DrawString(eng(36), fnt(1), Brushes.Black, 180, 713)
e.Graphics.DrawString(mrs(36), fnt(0), Brushes.Blue, 280, 713)
e.Graphics.DrawString(eng(37), fnt(1), Brushes.Black, 380, 713)
e.Graphics.DrawString(mrs(37), fnt(0), Brushes.Blue, 482, 713)
e.Graphics.DrawString(eng(38), fnt(1), Brushes.Black, 569, 713)
e.Graphics.DrawString(mrs(38), fnt(0), Brushes.Blue, 721, 713)
e.Graphics.DrawString(eng(39), fnt(1), Brushes.Black, 810, 713)
e.Graphics.DrawString(mrs(39), fnt(0), Brushes.Blue, 880, 713)
e.Graphics.DrawString((scrs(28) + scrs(29) + scrs(30) + scrs(31)).ToString("000"), fnt(2), Brushes.Crimson, 950, 719)
e.Graphics.DrawLine(Pens.Crimson, 938, 759, 990, 759)
e.Graphics.DrawString((scrs(32)).ToString("0000"), fnt(2), Brushes.Crimson, 937, 762)
Case 1
e.Graphics.DrawString("Suggestion: Repeat trial until you achieve score % you are happy with.", fnt(4), Brushes.Blue, 30, 10)
e.Graphics.DrawString("Good Keyboard/Typing skills give significant advantage to score.", fnt(4), Brushes.Blue, 30, 40)
e.Graphics.DrawString("Points are awarded on time taken to complete trial. Time penalties apply for incorrect answer.", fnt(4), Brushes.Blue, 30, 70)
e.Graphics.DrawString("Age, natural ability, blood sugar levels . . . all influence your output speed. Breathe!", fnt(4), Brushes.Blue, 30, 100)
e.Graphics.DrawString("Low typing skills: May see 20% scores. This is still very good. You will learn Morse Code.", fnt(4), Brushes.Blue, 30, 130)
e.Graphics.DrawString("Good typing skills: May see 100% scores.", fnt(4), Brushes.Blue, 30, 160)
I = (lssn - 1) * 4
e.Graphics.DrawString(scrs(I).ToString("##0") & "/25", fnt(2), Brushes.Crimson, 700, 215)
e.Graphics.DrawString(scrs(I + 1).ToString("##0") & "/50", fnt(2), Brushes.Crimson, 700, 315)
e.Graphics.DrawString(scrs(I + 2).ToString("##0") & "/75", fnt(2), Brushes.Crimson, 700, 415)
e.Graphics.DrawString(scrs(I + 3).ToString("##0") & "/100", fnt(2), Brushes.Crimson, 700, 515)
Case 2, 4
e.Graphics.DrawString("Provide morse code answer using the [-]dash and [.]period keys.", fnt(4), Brushes.Black, 40, 20)
e.Graphics.DrawString("Use the [space bar] to return your morse code input. (Like an Enter key.)", fnt(4), Brushes.Black, 40, 50)
e.Graphics.DrawString("Target speed: " & fast(trial - 1).ToString & " sec per input. " & slow(trial - 1).ToString & _
" second penalty for wrong answer.", fnt(4), Brushes.Black, 40, 80)
e.Graphics.DrawString("Trial Length = " & trL.ToString, fnt(4), Brushes.Black, 40, 110)
e.Graphics.DrawString("Timer starts after the first answer. You can bail out at any time, and retry test.", fnt(4), Brushes.Black, 40, 140)
Case 3
e.Graphics.DrawString("Provide three letter phonetic answer like nov for November,", fnt(4), Brushes.Black, 40, 20)
e.Graphics.DrawString("or jul for Julliet. Use [space bar] key to return answer.", fnt(4), Brushes.Black, 40, 50)
e.Graphics.DrawString("Target speed: " & fast(trial - 1).ToString & " sec per input. " & slow(trial - 1).ToString & _
" second penalty for wrong answer.", fnt(4), Brushes.Black, 40, 80)
e.Graphics.DrawString("Trial Length = " & trL.ToString, fnt(4), Brushes.Black, 40, 110)
Case 5
e.Graphics.DrawString("Provide single character like n for November,", fnt(4), Brushes.Black, 40, 20)
e.Graphics.DrawString("or j for Julliet. Use [space bar] key to return answer.", fnt(4), Brushes.Black, 40, 50)
e.Graphics.DrawString("Target speed: " & fast(trial - 1).ToString & " sec per input. " & slow(trial - 1).ToString & _
" second penalty for wrong answer.", fnt(4), Brushes.Black, 40, 80)
e.Graphics.DrawString("Trial Length = " & trL.ToString, fnt(4), Brushes.Black, 40, 110)
End Select
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
lssn = 1
iwg()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
lssn = 2
iwg()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
lssn = 3
iwg()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
lssn = 4
iwg()
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
lssn = 5
iwg()
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
lssn = 6
iwg()
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
lssn = 7
iwg()
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
lssn = 8
iwg()
End Sub
2nd half in the next post
Top Tip: Toothache? Cut paper towel to 2"square. Smear with olive oil. Sprinkle on Cayenne Pepper. Fold over few times to form small wad. Tuck in between wall of mouth and gum. Leave 1 - 2 hrs. You will thank me!
Continue reading...
I have a free little application to share. I realise it is not Christmas or thanksgiving - but decided to publish this anyway. I wanted to learn the Phonetic callsigns, and as I researched it, I became interested in learning morse code as well. The little program I wrote for myself sort of grew and grew to include a points and awarding system as well.
Screenshot 1
Screenshot 2
You need to add 13 buttons, 5 labels, and 1 textbox to a form in the designer. They must all have their Visible property set to False. And add 2 Timers also. Also need to define a string variable named scores in My.Settings
1st half of the code: -
Public Class Form5 learn morse code . . . . Programmer: Leon Stanley 2015
Dim eng(39) As String
Dim mrs(39) As String
Dim sCh(39) As String
Dim sbG() As Integer = {4, 19, 0, 8, 12, 13, 127, 3, 6, 10, 14, 127, 17, 18, 20, 22, 127, _
1, 2, 5, 7, 127, 9, 11, 15, 16, 127, 21, 23, 24, 25, 127, _
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 127, 36, 37, 38, 39, 127}
Dim lst As New List(Of Integer)
Dim scrs(32) As Integer holds scores
Dim fnt(4) As Font
Dim R As New Random
Dim mode, lssn, trial As Integer mode, current lesson, current trial
Dim counter, errors, present, trL, tmrC As Integer
Dim slow() As Single = {4, 5, 4, 3.7} slow benchmark seconds per answer
Dim fast() As Single = {1.6, 2.2, 1.6, 1.4} fast benchmark
Dim plyr As Integer
Dim player As String
Dim sw As New Stopwatch
Dim isTmng, isSvExit As Boolean is timing trial, is to be saved on exit
Dim mPnt As Point mouse point
Private Sub Form5_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
If mode = -1 Then Exit Sub
If isSvExit Then mew()
End Sub
Private Sub Form5_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim I, J, K As Integer
Dim S As String = ""
fnt(0) = New Font("segoe UI", 28, FontStyle.Bold, GraphicsUnit.Pixel)
fnt(1) = New Font("palatino linotype", 28, FontStyle.Regular, GraphicsUnit.Pixel)
fnt(2) = New Font("courier new", 20, FontStyle.Bold, GraphicsUnit.Pixel)
fnt(3) = New Font("palatino linotype", 40, FontStyle.Regular, GraphicsUnit.Pixel)
fnt(4) = New Font("segoe ui", 20, FontStyle.Regular, GraphicsUnit.Pixel)
Dim english As String = "Alfa,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel,India,Juliett," & _
"Kilo,Lima,Mike,November,Oscar,Papa,Quebec,Romeo,Sierra,Tango,Uniform,Victor,Whiskey,Xray,Yankee,Zulu," & _
"Zero,One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Period,Comma,QuestMark,Slash,"
Dim morse As String = ".-,-...,-.-.,-..,.,..-.,--.,....,..,.---," & _
"-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-," & _
"..-,...-,.--,-..-,-.--,--..,-----,.----,..---,...--," & _
"....-,.....,-....,--...,---..,----.,.-.-.-,--..--,..--..,-..-.,"
Dim snglChr As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,?/"
Do Until I = 40
K = english.IndexOf(",", J)
eng(I) = english.Substring(J, K - J)
J = K + 1 : I += 1
Loop
I = 0 : J = 0
Do Until I = 40
K = morse.IndexOf(",", J)
mrs(I) = morse.Substring(J, K - J)
J = K + 1 : I += 1
Loop
For I = 0 To 39
lst.Add(I)
sCh(I) = snglChr.ElementAt(I)
Next
If Not My.Settings.scores.Length = 600 Then initialize .scores on first run instance
For J = 0 To 4
For I = 0 To 19
S &= Chr(127)
Next I
For I = 0 To 99
S &= Chr(48)
Next
Next J
My.Settings.scores = S
End If
Font = fnt(1)
ClientSize = New Size(1000, 800)
Label1.Location = New Point(100, 200)
Label2.Location = New Point(200, 400)
Label2.Text = "Errors = 0 out of 0"
Label3.Location = New Point(650, 215) : Label3.Text = "" : Label3.Font = fnt(2)
Label3.BackColor = Color.LightBlue : Label3.ForeColor = Color.Crimson
Label4.Location = New Point(300, 300)
Label5.Location = New Point(200, 350) : Label5.BackColor = Color.LightBlue
TextBox1.Location = New Point(300, 200) : Label4.BackColor = Color.Goldenrod
Text = "Learn Morse Code"
Timer1.Interval = 20 : Timer2.Interval = 20
Button1.Text = "Lesson 1" : Button2.Text = "Lesson 2" : Button3.Text = "Lesson 3" : Button4.Text = "Lesson 4"
Button5.Text = "Lesson 5" : Button6.Text = "Lesson 6" : Button7.Text = "Lesson 7" : Button8.Text = "Lesson 8"
Button10.Text = "Trial 1: Phonetic >>> Morse" : Button11.Text = "Trial 2: Morse >>> Phonetic "
Button12.Text = "Trial 3: Character >>> Morse" : Button13.Text = "Trial 4: Morse >>> Character"
Button9.Text = " <<< Back"
Button1.Location = New Point(30, 73) : Button2.Location = New Point(30, 173) : Button3.Location = New Point(30, 255)
Button4.Location = New Point(30, 337) : Button5.Location = New Point(30, 419) : Button6.Location = New Point(30, 501)
Button7.Location = New Point(30, 609) : Button8.Location = New Point(30, 708)
Button10.Location = New Point(300, 200) : Button11.Location = New Point(300, 300)
Button12.Location = New Point(300, 400) : Button13.Location = New Point(300, 500)
mode = -1
FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D
CenterToScreen()
End Sub
Private Sub Form5_MouseClick(sender As Object, e As MouseEventArgs) Handles Me.MouseClick
If Not mode = -1 Then Exit Sub
Dim I, J, K As Integer
Dim S, T As String
If mPnt.X < 300 Or mPnt.X > 700 Then Exit Sub
If mPnt.Y < 200 Or mPnt.Y > 699 Then Exit Sub
If (mPnt.Y Mod 100) > 80 Then Exit Sub
I = CInt(Int((mPnt.Y - 200) / 100))
If e.Button = Windows.Forms.MouseButtons.Right Then
If My.Settings.scores.ElementAt(I * 120) = Chr(127) Then Exit Sub
this is where we delete an existing player
If MessageBox.Show("Are you sure you want to delete this player?", "Please confirm Deletion", _
MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = Windows.Forms.DialogResult.Yes Then
S = ""
For J = 0 To 19
S &= Chr(127)
Next
For J = 0 To 99
S &= Chr(48)
Next
My.Settings.scores = My.Settings.scores.Remove(I * 120, S.Length)
My.Settings.scores = My.Settings.scores.Insert(I * 120, S)
Invalidate()
End If
Else
If My.Settings.scores.ElementAt(I * 120) = Chr(127) Then
this is where we enter a new player
S = InputBox("Please type in a name - - max 19 characters.", "Name of new player", "")
If S.Replace(" ", "") = "" Or S.Replace(" ", "") = "..free.." Then Exit Sub
If S.Length > 19 Then Exit Sub
For K = 0 To 480 Step 120
J = K : T = ""
Do Until My.Settings.scores.ElementAt(J) = Chr(127)
T &= My.Settings.scores.ElementAt(J)
J += 1
Loop
If S = T Then Exit Sub
Next
My.Settings.scores = My.Settings.scores.Remove(I * 120, S.Length)
My.Settings.scores = My.Settings.scores.Insert(I * 120, S)
Invalidate()
Else
this is where we select a player and start game
plyr = I
J = I * 120 : player = ""
Do Until My.Settings.scores.ElementAt(J) = Chr(127)
player &= My.Settings.scores.ElementAt(J)
J += 1
Loop
K = 0
For J = I * 120 + 24 To I * 120 + 117 Step 3
scrs(K) = CInt(My.Settings.scores.Substring(J, 3))
K += 1
Next
scrs(32) = CInt(My.Settings.scores.Substring(I * 120 + 20, 4))
mode = 0
mde()
End If
End If
End Sub
Private Sub Form5_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
If Not mode = -1 Then Exit Sub
mPnt = e.Location
End Sub
Private Sub Form5_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
e.Graphics.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit
Dim I, J, K As Integer
Select Case mode
Case -1
e.Graphics.DrawString("Click on a ..free.. listing to start a new player.", fnt(4), Brushes.Blue, 30, 30)
e.Graphics.DrawString("RightMouseClick on an existing player to delete.", fnt(4), Brushes.Blue, 30, 60)
e.Graphics.DrawString("Click on an existing player to select and begin play.", fnt(4), Brushes.Blue, 30, 90)
e.Graphics.DrawString("There are only five player slots available.", fnt(4), Brushes.Blue, 30, 120)
Using grbrsh As New Drawing2D.LinearGradientBrush(New Point(250, 500), New Point(750, 500), Color.Gold, Color.Goldenrod)
For I = 200 To 600 Step 100
e.Graphics.FillRectangle(grbrsh, 300, I, 400, 80)
Next
End Using
J = 220
For I = 0 To 480 Step 120
If Asc(My.Settings.scores.ElementAt(I)) = 127 Then
e.Graphics.DrawString("..free..", fnt(0), Brushes.DodgerBlue, 320, J)
e.Graphics.DrawString(My.Settings.scores.Substring(I + 20, 4), fnt(0), Brushes.DodgerBlue, 600, J)
Else
K = My.Settings.scores.IndexOf(Chr(127), I)
e.Graphics.DrawString(My.Settings.scores.Substring(I, K - I), fnt(0), Brushes.Blue, New Rectangle(320, J, 290, 40)) 320, J)
e.Graphics.DrawString(My.Settings.scores.Substring(I + 20, 4), fnt(0), Brushes.Blue, 600, J)
End If
J += 100
Next
e.Graphics.DrawString("-- --- .-. ... . .-- .- ... .- --. --- --- -.. -- .- -.", fnt(0), Brushes.Blue, 30, 750)
Case 0
e.Graphics.DrawString("Memorize the appropriate Morse codes before starting each lessson.", fnt(4), Brushes.Blue, 30, 10)
e.Graphics.DrawString("Points", fnt(2), Brushes.Crimson, 912, 30)
e.Graphics.DrawString(eng(4), fnt(1), Brushes.Black, 180, 56)
e.Graphics.DrawString(mrs(4), fnt(0), Brushes.Blue, 280, 56)
e.Graphics.DrawString(eng(19), fnt(1), Brushes.Black, 380, 56)
e.Graphics.DrawString(mrs(19), fnt(0), Brushes.Blue, 480, 56)
e.Graphics.DrawString(eng(0), fnt(1), Brushes.Black, 180, 98)
e.Graphics.DrawString(mrs(0), fnt(0), Brushes.Blue, 280, 98)
e.Graphics.DrawString(eng(8), fnt(1), Brushes.Black, 380, 98)
e.Graphics.DrawString(mrs(8), fnt(0), Brushes.Blue, 480, 98)
e.Graphics.DrawString(eng(12), fnt(1), Brushes.Black, 580, 98)
e.Graphics.DrawString(mrs(12), fnt(0), Brushes.Blue, 680, 98)
e.Graphics.DrawString(eng(13), fnt(1), Brushes.Black, 780, 98)
e.Graphics.DrawString(mrs(13), fnt(0), Brushes.Blue, 920, 98)
e.Graphics.DrawString((scrs(0) + scrs(1) + scrs(2) + scrs(3)).ToString("000"), fnt(2), Brushes.Crimson, 950, 80)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 149, 960, 149)
e.Graphics.DrawString(eng(3), fnt(1), Brushes.Black, 180, 178)
e.Graphics.DrawString(mrs(3), fnt(0), Brushes.Blue, 280, 178)
e.Graphics.DrawString(eng(6), fnt(1), Brushes.Black, 380, 178)
e.Graphics.DrawString(mrs(6), fnt(0), Brushes.Blue, 480, 178)
e.Graphics.DrawString(eng(10), fnt(1), Brushes.Black, 580, 178)
e.Graphics.DrawString(mrs(10), fnt(0), Brushes.Blue, 680, 178)
e.Graphics.DrawString(eng(14), fnt(1), Brushes.Black, 780, 178)
e.Graphics.DrawString(mrs(14), fnt(0), Brushes.Blue, 880, 178)
e.Graphics.DrawString((scrs(4) + scrs(5) + scrs(6) + scrs(7)).ToString("000"), fnt(2), Brushes.Crimson, 950, 184)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 241, 960, 241)
e.Graphics.DrawString(eng(17), fnt(1), Brushes.Black, 180, 260)
e.Graphics.DrawString(mrs(17), fnt(0), Brushes.Blue, 280, 260)
e.Graphics.DrawString(eng(18), fnt(1), Brushes.Black, 380, 260)
e.Graphics.DrawString(mrs(18), fnt(0), Brushes.Blue, 480, 260)
e.Graphics.DrawString(eng(20), fnt(1), Brushes.Black, 580, 260)
e.Graphics.DrawString(mrs(20), fnt(0), Brushes.Blue, 695, 260)
e.Graphics.DrawString(eng(22), fnt(1), Brushes.Black, 780, 260)
e.Graphics.DrawString(mrs(22), fnt(0), Brushes.Blue, 895, 260)
e.Graphics.DrawString((scrs(8) + scrs(9) + scrs(10) + scrs(11)).ToString("000"), fnt(2), Brushes.Crimson, 950, 266)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 323, 960, 323)
e.Graphics.DrawString(eng(1), fnt(1), Brushes.Black, 180, 343)
e.Graphics.DrawString(mrs(1), fnt(0), Brushes.Blue, 280, 343)
e.Graphics.DrawString(eng(2), fnt(1), Brushes.Black, 380, 343)
e.Graphics.DrawString(mrs(2), fnt(0), Brushes.Blue, 480, 343)
e.Graphics.DrawString(eng(5), fnt(1), Brushes.Black, 580, 343)
e.Graphics.DrawString(mrs(5), fnt(0), Brushes.Blue, 680, 343)
e.Graphics.DrawString(eng(7), fnt(1), Brushes.Black, 780, 343)
e.Graphics.DrawString(mrs(7), fnt(0), Brushes.Blue, 880, 343)
e.Graphics.DrawString((scrs(12) + scrs(13) + scrs(14) + scrs(15)).ToString("000"), fnt(2), Brushes.Crimson, 950, 349)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 405, 960, 405)
e.Graphics.DrawString(eng(9), fnt(1), Brushes.Black, 180, 425)
e.Graphics.DrawString(mrs(9), fnt(0), Brushes.Blue, 280, 425)
e.Graphics.DrawString(eng(11), fnt(1), Brushes.Black, 380, 425)
e.Graphics.DrawString(mrs(11), fnt(0), Brushes.Blue, 480, 425)
e.Graphics.DrawString(eng(15), fnt(1), Brushes.Black, 580, 425)
e.Graphics.DrawString(mrs(15), fnt(0), Brushes.Blue, 680, 425)
e.Graphics.DrawString(eng(16), fnt(1), Brushes.Black, 780, 425)
e.Graphics.DrawString(mrs(16), fnt(0), Brushes.Blue, 880, 425)
e.Graphics.DrawString((scrs(16) + scrs(17) + scrs(18) + scrs(19)).ToString("000"), fnt(2), Brushes.Crimson, 950, 431)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 487, 960, 487)
e.Graphics.DrawString(eng(21), fnt(1), Brushes.Black, 180, 508)
e.Graphics.DrawString(mrs(21), fnt(0), Brushes.Blue, 280, 508)
e.Graphics.DrawString(eng(23), fnt(1), Brushes.Black, 380, 508)
e.Graphics.DrawString(mrs(23), fnt(0), Brushes.Blue, 480, 508)
e.Graphics.DrawString(eng(24), fnt(1), Brushes.Black, 580, 508)
e.Graphics.DrawString(mrs(24), fnt(0), Brushes.Blue, 680, 508)
e.Graphics.DrawString(eng(25), fnt(1), Brushes.Black, 780, 508)
e.Graphics.DrawString(mrs(25), fnt(0), Brushes.Blue, 880, 508)
e.Graphics.DrawString((scrs(20) + scrs(21) + scrs(22) + scrs(23)).ToString("000"), fnt(2), Brushes.Crimson, 950, 514)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 569, 960, 569)
e.Graphics.DrawString(eng(26), fnt(1), Brushes.Black, 180, 590)
e.Graphics.DrawString(mrs(26), fnt(0), Brushes.Blue, 250, 590)
e.Graphics.DrawString(eng(27), fnt(1), Brushes.Black, 335, 590)
e.Graphics.DrawString(mrs(27), fnt(0), Brushes.Blue, 405, 590)
e.Graphics.DrawString(eng(28), fnt(1), Brushes.Black, 490, 590)
e.Graphics.DrawString(mrs(28), fnt(0), Brushes.Blue, 560, 590)
e.Graphics.DrawString(eng(29), fnt(1), Brushes.Black, 645, 590)
e.Graphics.DrawString(mrs(29), fnt(0), Brushes.Blue, 720, 590)
e.Graphics.DrawString(eng(30), fnt(1), Brushes.Black, 800, 590)
e.Graphics.DrawString(mrs(30), fnt(0), Brushes.Blue, 870, 590)
e.Graphics.DrawString(eng(31), fnt(1), Brushes.Black, 180, 631)
e.Graphics.DrawString(mrs(31), fnt(0), Brushes.Blue, 250, 631)
e.Graphics.DrawString(eng(32), fnt(1), Brushes.Black, 335, 631)
e.Graphics.DrawString(mrs(32), fnt(0), Brushes.Blue, 405, 631)
e.Graphics.DrawString(eng(33), fnt(1), Brushes.Black, 490, 631)
e.Graphics.DrawString(mrs(33), fnt(0), Brushes.Blue, 566, 631)
e.Graphics.DrawString(eng(34), fnt(1), Brushes.Black, 645, 631)
e.Graphics.DrawString(mrs(34), fnt(0), Brushes.Blue, 715, 631)
e.Graphics.DrawString(eng(35), fnt(1), Brushes.Black, 800, 631)
e.Graphics.DrawString(mrs(35), fnt(0), Brushes.Blue, 870, 631)
e.Graphics.DrawString((scrs(24) + scrs(25) + scrs(26) + scrs(27)).ToString("000"), fnt(2), Brushes.Crimson, 950, 613)
e.Graphics.DrawLine(Pens.DarkSlateGray, 40, 692, 960, 692)
e.Graphics.DrawString(eng(36), fnt(1), Brushes.Black, 180, 713)
e.Graphics.DrawString(mrs(36), fnt(0), Brushes.Blue, 280, 713)
e.Graphics.DrawString(eng(37), fnt(1), Brushes.Black, 380, 713)
e.Graphics.DrawString(mrs(37), fnt(0), Brushes.Blue, 482, 713)
e.Graphics.DrawString(eng(38), fnt(1), Brushes.Black, 569, 713)
e.Graphics.DrawString(mrs(38), fnt(0), Brushes.Blue, 721, 713)
e.Graphics.DrawString(eng(39), fnt(1), Brushes.Black, 810, 713)
e.Graphics.DrawString(mrs(39), fnt(0), Brushes.Blue, 880, 713)
e.Graphics.DrawString((scrs(28) + scrs(29) + scrs(30) + scrs(31)).ToString("000"), fnt(2), Brushes.Crimson, 950, 719)
e.Graphics.DrawLine(Pens.Crimson, 938, 759, 990, 759)
e.Graphics.DrawString((scrs(32)).ToString("0000"), fnt(2), Brushes.Crimson, 937, 762)
Case 1
e.Graphics.DrawString("Suggestion: Repeat trial until you achieve score % you are happy with.", fnt(4), Brushes.Blue, 30, 10)
e.Graphics.DrawString("Good Keyboard/Typing skills give significant advantage to score.", fnt(4), Brushes.Blue, 30, 40)
e.Graphics.DrawString("Points are awarded on time taken to complete trial. Time penalties apply for incorrect answer.", fnt(4), Brushes.Blue, 30, 70)
e.Graphics.DrawString("Age, natural ability, blood sugar levels . . . all influence your output speed. Breathe!", fnt(4), Brushes.Blue, 30, 100)
e.Graphics.DrawString("Low typing skills: May see 20% scores. This is still very good. You will learn Morse Code.", fnt(4), Brushes.Blue, 30, 130)
e.Graphics.DrawString("Good typing skills: May see 100% scores.", fnt(4), Brushes.Blue, 30, 160)
I = (lssn - 1) * 4
e.Graphics.DrawString(scrs(I).ToString("##0") & "/25", fnt(2), Brushes.Crimson, 700, 215)
e.Graphics.DrawString(scrs(I + 1).ToString("##0") & "/50", fnt(2), Brushes.Crimson, 700, 315)
e.Graphics.DrawString(scrs(I + 2).ToString("##0") & "/75", fnt(2), Brushes.Crimson, 700, 415)
e.Graphics.DrawString(scrs(I + 3).ToString("##0") & "/100", fnt(2), Brushes.Crimson, 700, 515)
Case 2, 4
e.Graphics.DrawString("Provide morse code answer using the [-]dash and [.]period keys.", fnt(4), Brushes.Black, 40, 20)
e.Graphics.DrawString("Use the [space bar] to return your morse code input. (Like an Enter key.)", fnt(4), Brushes.Black, 40, 50)
e.Graphics.DrawString("Target speed: " & fast(trial - 1).ToString & " sec per input. " & slow(trial - 1).ToString & _
" second penalty for wrong answer.", fnt(4), Brushes.Black, 40, 80)
e.Graphics.DrawString("Trial Length = " & trL.ToString, fnt(4), Brushes.Black, 40, 110)
e.Graphics.DrawString("Timer starts after the first answer. You can bail out at any time, and retry test.", fnt(4), Brushes.Black, 40, 140)
Case 3
e.Graphics.DrawString("Provide three letter phonetic answer like nov for November,", fnt(4), Brushes.Black, 40, 20)
e.Graphics.DrawString("or jul for Julliet. Use [space bar] key to return answer.", fnt(4), Brushes.Black, 40, 50)
e.Graphics.DrawString("Target speed: " & fast(trial - 1).ToString & " sec per input. " & slow(trial - 1).ToString & _
" second penalty for wrong answer.", fnt(4), Brushes.Black, 40, 80)
e.Graphics.DrawString("Trial Length = " & trL.ToString, fnt(4), Brushes.Black, 40, 110)
Case 5
e.Graphics.DrawString("Provide single character like n for November,", fnt(4), Brushes.Black, 40, 20)
e.Graphics.DrawString("or j for Julliet. Use [space bar] key to return answer.", fnt(4), Brushes.Black, 40, 50)
e.Graphics.DrawString("Target speed: " & fast(trial - 1).ToString & " sec per input. " & slow(trial - 1).ToString & _
" second penalty for wrong answer.", fnt(4), Brushes.Black, 40, 80)
e.Graphics.DrawString("Trial Length = " & trL.ToString, fnt(4), Brushes.Black, 40, 110)
End Select
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
lssn = 1
iwg()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
lssn = 2
iwg()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
lssn = 3
iwg()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
lssn = 4
iwg()
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
lssn = 5
iwg()
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
lssn = 6
iwg()
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
lssn = 7
iwg()
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
lssn = 8
iwg()
End Sub
2nd half in the next post
Top Tip: Toothache? Cut paper towel to 2"square. Smear with olive oil. Sprinkle on Cayenne Pepper. Fold over few times to form small wad. Tuck in between wall of mouth and gum. Leave 1 - 2 hrs. You will thank me!
Continue reading...