Click here to Skip to main content
15,881,882 members
Articles / Programming Languages / Visual Basic

Child's Learning Center - Pre-schoolers 3 to 5 Years of Age

Rate me:
Please Sign up or sign in to vote.
4.72/5 (11 votes)
8 Jul 2009CPOL4 min read 34.1K   1.3K   22   12
A Learning tool to help prepare your child for pre-school

Introduction

This app uses System.Speech and System.Speech.Synthesize namespaces. There is nothing too special with these as they have been used in a few apps here at CodeProject and a few other sites. The applications that can be thought of using System.Speech are unimaginable. I came up with this idea from a few apps that are here at CodeProject. I ran one of the apps and my grandchildren were amazed at the computer talking. So I added their names to the program and ran it. They were surprised to hear their names. Their attention spans were as short as this >.<. Now they are not.

This app is a (CLC) Child's Learning Center and there is nothing more valuable than a child or grandchild's education. This app targets the 3 to 5 year old pre-schoolers. Some children might start to read at 2 years of age and others might start at 6 years. If your child is a little bored, stop the learning process for a couple of weeks and TRY again. Remember, children learn at their own pace.

The requirements for the app are: Children, Adobe's PDF Reader, Powerpoint viewer, both installed to their default locations, go to www.brillkids.com, to get all the PDF and Powerpoint Presentation activity sheets and visual learning tools free. This app was tested on Vista Home Basic w/SP2, .NET 3.5, Visual Studio 2008 Pro w/SP1, 1024X768, and my grandchildren.

There are many Child Learning Applications out there, but this one is Free. It works, and my grandchildren's attention spans have increased 10 fold. They interact with the computer by doing, seeing, and hearing what they have just done. Repeating the same steps, 3 times, helps the child remember.

Putting this app together was a learning process for me. I had to think of what I would like to see as a child, different colors, animal pictures, letters, numbers, pretty fruit, and the computer talking. I am by no means, a designer or a teacher, but I am someone who believes that if something works, don't Fix-It. I didn't believe it at first, this actually works.

The Design

CLC

Introduction

First was the Parent-Child interactivity mode. I added a TextBox to hold the child's name. I then added a GroupBox to hold five CheckBoxes and a couple of Buttons to display the different activities. Then I added the activity GroupBoxes with alphabet buttons, number buttons, a few pictureBoxes and a label. Putting this all together starts the learning process.

Problems and Code Usage

I had a problem when clicking on a checkbox and checking it, then clicking on another checkbox, having it checked and the previous checkbox, unchecked, while displaying the correct groupbox for the current checkbox. Confused??? So was I after I wrote that long-winded sentence, but it makes perfectly good sense to me, now. This turned out to be somewhat simple enough without any overflow exceptions being thrown. I then added two more checkboxes to the Numbers GroupBox, using the same method, I was getting overflow exceptions. After a few trial and error attempts, I came up with these two examples:

VB.NET
Private Sub chkPlus_CheckedChanged(ByVal sender As System.Object, _
                                       ByVal e As System.EventArgs) _
                                       Handles chkPlus.CheckedChanged

        If chkPlus.Checked Then
            lblSign.Text = "+"
            chkMinus.Checked = False
        Else
            lblSign.Text = "-"
            chkMinus.Checked = True
        End If
    End Sub

    Private Sub chkMinus_CheckedChanged(ByVal sender As System.Object, _
                                        ByVal e As System.EventArgs) _
                                        Handles chkMinus.CheckedChanged

        If chkMinus.Checked Then
            lblSign.Text = "-"
            chkPlus.Checked = False
        Else
            lblSign.Text = "+"
            chkPlus.Checked = True
        End If
    End Sub

CLC2.jpg

Clicking on one checkbox switches from one checkbox to the other, and visa-versa.

My next problem was with the simple addition (1 + 1 = 2). I haven't been programming that long and when I typed 1 in the first textbox and 1 in the next textbox then added them together, I got 'cannot convert string to Integer'. I just forgot to convert the text numbers to integers. After all the fuss, I came up with this:

VB.NET
Private Sub btnPlus_Click(ByVal sender As System.Object, _
                              ByVal e As System.EventArgs) _
                              Handles btnPlus.Click

        ansPlus = (CInt(txtNum1.Text) + CInt(txtNum2.Text))
    End Sub

    Private Sub btnMinus_Click(ByVal sender As System.Object, _
                               ByVal e As System.EventArgs) _
                               Handles btnMinus.Click

        ansMinus = (CInt(txtNum1.Text) - CInt(txtNum2.Text))
    End Sub

    Private Sub btnEnter_Click(ByVal sender As System.Object, _
                               ByVal e As System.EventArgs) _
                               Handles btnEnter.Click

        If chkPlus.Checked Then
            If CInt(txtAnswer.Text) = ansPlus Then
                strSay = CInt(txtNum1.Text) & " plus " & CInt(txtNum2.Text) & _
                         " equals " & CInt(txtAnswer.Text)
                InitializeSpeaker()
                speaker.SpeakAsync(strSay)
                MessageBox.Show("Correct :) " & txtName.Text)
            Else
                MessageBox.Show("Try Again :( " & txtName.Text)
            End If
        Else
            If CInt(txtAnswer.Text) = ansMinus Then
                strSay = CInt(txtNum1.Text) & " minus " & CInt(txtNum2.Text) & _
                         " equals " & CInt(txtAnswer.Text)
                InitializeSpeaker()
                speaker.SpeakAsync(strSay)
                MessageBox.Show("Correct :) " & txtName.Text)
            Else
                MessageBox.Show("Try Again :( " & txtName.Text)
            End If
        End If
    End Sub

Applying the spelling routine was pretty straight forward. I created 'wordlist.txt' file to hold all my 2 and 3 letter words, I then added a ListBox and made it invisible as it is not used for any type of selection. I added two more buttons, btnNext, btnPrevious to navigate the word list in the Listbox. Here is what I came up with that works fairly well:

VB.NET
Private Sub LoadListWords()
        Try
            Dim sr As StreamReader = New StreamReader(wordlistPath)
            'sr.ReadBlock(
            Do While sr.Peek() >= 0
                strWord = sr.ReadLine
                Me.lstWords.Items.Add(strWord)
            Loop

            sr.Close()
            sr = Nothing

            lstWords.SelectedIndex = 0
            wordIndex = 0

        Catch ex As Exception
            MessageBox.Show("Error : " & ex.Message)
        End Try
    End Sub

    Private Sub btnPrevious_Click(ByVal sender As System.Object, _
                                  ByVal e As System.EventArgs) Handles btnPrevious.Click
        If wordIndex <= 0 Then Exit Sub
        lstWords.SetSelected(wordIndex, False)
        wordIndex -= 1
        lstWords.SetSelected(wordIndex, True)
        lblSpell.Text = lstWords.SelectedItem.ToString()
    End Sub

    Private Sub btnNext_Click(ByVal sender As System.Object, _
                              ByVal e As System.EventArgs) Handles btnNext.Click
        If wordIndex >= lstWords.Items.Count - 1 Then Exit Sub
        lstWords.SetSelected(wordIndex, False)
        wordIndex += 1
        lstWords.SetSelected(wordIndex, True)
        lblSpell.Text = lstWords.SelectedItem.ToString()
    End Sub

    Private Sub btnSPClear_Click(ByVal sender As System.Object, _
                                 ByVal e As System.EventArgs) Handles btnSPClear.Click
        strSay = ""
        txtSpell.Text = ""
    End Sub

    Private Sub btnSPSay_Click(ByVal sender As System.Object, _
                               ByVal e As System.EventArgs) Handles btnSPSay.Click
        InitializeSpeaker()
        speaker.SpeakAsync(strSay)
        strGood = strCorrect & txtName.Text
        If strSay = txtSpell.Text Then
            speaker.SpeakAsync(strGood)
        Else
            ' Do Nothing
        End If
    End Sub

CLC3.jpg

Background

After I put everything together and got it working correctly, then came the testing. I started with my oldest granddaughter, who is 4 years old and pretty much set in her ways already. To my amazement, she took right to it. Now, when she comes over, this is the first thing she wants to do. She already knew how to sing the alphabet song so I started teaching her the letters of the alphabet with the A is For... part of the program. Next is writing the letters. You can download all child activities from www.brillkids.com. They are free and well worth it.

History

  • Date uploaded: July 9th, 2009 Version: 1.0.0.0

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
United States United States
I am currently retired.
I have no degree but I have some programming experience
when I was in college(Cobol, Pascal).

My accomplishments thus far are;
Best VB.Net article for January(2009)
Best VB.Net article for July(2009)

Comments and Discussions

 
Generalgood one Pin
Mahmoud Elgindy7-Aug-11 6:28
Mahmoud Elgindy7-Aug-11 6:28 
GeneralRe: good one Pin
rspercy657-Aug-11 11:48
rspercy657-Aug-11 11:48 
GeneralChild's Learning Center.... Pin
cbragdon19-Sep-09 13:10
cbragdon19-Sep-09 13:10 
GeneralRe: Child's Learning Center.... Pin
rspercy6520-Sep-09 2:26
rspercy6520-Sep-09 2:26 
GeneralEnhancements Pin
Tusahr11212-Aug-09 22:43
Tusahr11212-Aug-09 22:43 
Hello sir,
I downloaded your application and really learned a lot from it and I have updated it a bit like inserted paint,story reading etc.I wish to update your article and as I am newbie I don't know what to do.Should I send you the updated code to view. Smile | :)
GeneralRe: Enhancements Pin
rspercy6513-Aug-09 1:36
rspercy6513-Aug-09 1:36 
GeneralNice Pin
Shane Story20-Jul-09 6:29
Shane Story20-Jul-09 6:29 
GeneralRe: Nice Pin
rspercy6520-Jul-09 11:06
rspercy6520-Jul-09 11:06 
GeneralRe: Nice Pin
Shane Story20-Jul-09 11:25
Shane Story20-Jul-09 11:25 
GeneralRe: Nice Pin
rspercy6522-Jul-09 4:28
rspercy6522-Jul-09 4:28 
GeneralFantastic program Pin
pennyjp20-Jul-09 6:09
pennyjp20-Jul-09 6:09 
GeneralNice program Pin
LittleBlueBird13-Jul-09 6:20
LittleBlueBird13-Jul-09 6:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.