Welcome to Dream.In.Code
Become a VB Expert!

Join 149,556 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,601 people online right now. Registration is fast and FREE... Join Now!




Need to figure out how to make 1 button play another 10 buttons that

 
Reply to this topicStart new topic

Need to figure out how to make 1 button play another 10 buttons that

Learner15
16 Nov, 2007 - 03:17 PM
Post #1

New D.I.C Head
*

Joined: 15 Nov, 2007
Posts: 5


My Contributions
CODE
Public Class frmSpeak
    Dim intword As Integer
    Dim strWord1 As String
    Dim strWord2 As String
    Dim strWord3 As String
    Dim strWord4 As String
    Dim strWord5 As String
    Dim strWord6 As String
    Dim strWord7 As String
    Dim strWord8 As String
    Dim strWord9 As String
    Dim strWord10 As String

    
    Private Sub btnI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnI.Click
        Select Case intWord

            Case 1

                strWord1 = "I"

            Case 2

                strWord2 = "I"

            Case 3

                strWord3 = "I"

            Case 4

                strWord4 = "I"

            Case 5

                strWord5 = "I"

            Case 6

                strWord6 = "I"

            Case 7

                strWord7 = "I"

            Case 8

                strWord8 = "I"

            Case 9

                strWord9 = "I"

            Case 10

                strWord10 = "I"

        End Select
        intword += 1
    End Sub

    Private Sub btnDog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDog.Click
        Select Case intword

            Case 1

                strWord1 = "Dog"

            Case 2

                strWord2 = "Dog"

            Case 3

                strWord3 = "Dog"

            Case 4

                strWord4 = "Dog"

            Case 5

                strWord5 = "Dog"

            Case 6

                strWord6 = "Dog"

            Case 7

                strWord7 = "Dog"

            Case 8

                strWord8 = "Dog"

            Case 9

                strWord9 = "Dog"

            Case 10

                strWord10 = "Dog"

        End Select
        intword += 1
    End Sub

    Private Sub btnSaw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaw.Click
        Select Case intword

            Case 1

                strWord1 = "see"

            Case 2

                strWord2 = "see"

            Case 3

                strWord3 = "see"

            Case 4

                strWord4 = "see"

            Case 5

                strWord5 = "see"

            Case 6

                strWord6 = "saw"

            Case 7

                strWord7 = "see"

            Case 8

                strWord8 = "see"

            Case 9

                strWord9 = "see"

            Case 10

                strWord10 = "see"

        End Select
        intword += 1
    End Sub

    Private Sub btnFluffy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFluffy.Click
        Select Case intword

            Case 1

                strWord1 = "fluffy"

            Case 2

                strWord2 = "fluffy"

            Case 3

                strWord3 = "fluffy"

            Case 4

                strWord4 = "fluffy"

            Case 5

                strWord5 = "fluffy"

            Case 6

                strWord6 = "fluffy"

            Case 7

                strWord7 = "fluffy"

            Case 8

                strWord8 = "fluffy"

            Case 9

                strWord9 = "fluffy"

            Case 10

                strWord10 = "fluffy"

        End Select
        intword += 1
    End Sub

    Private Sub btnCat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCat.Click
        Select Case intword

            Case 1

                strWord1 = "cat"

            Case 2

                strWord2 = "cat"

            Case 3

                strWord3 = "cat"

            Case 4

                strWord4 = "cat"

            Case 5

                strWord5 = "cat"

            Case 6

                strWord6 = "cat"

            Case 7

                strWord7 = "cat"

            Case 8

                strWord8 = "cat"

            Case 9

                strWord9 = "cat"

            Case 10

                strWord10 = "cat"

        End Select
        intword += 1
    End Sub

    Private Sub btnWalk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWalk.Click
        Select Case intword

            Case 1

                strWord1 = "walk"

            Case 2

                strWord2 = "walk"

            Case 3

                strWord3 = "walk"

            Case 4

                strWord4 = "walk"

            Case 5

                strWord5 = "walk"

            Case 6

                strWord6 = "walk"

            Case 7

                strWord7 = "walk"

            Case 8

                strWord8 = "walk"

            Case 9

                strWord9 = "walk"

            Case 10

                strWord10 = "walk"

        End Select
        intword += 1
    End Sub
    Private Sub btnThe_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThe.Click
        Select Case intword

            Case 1

                strWord1 = "the"

            Case 2

                strWord2 = "the"

            Case 3

                strWord3 = "the"

            Case 4

                strWord4 = "the"

            Case 5

                strWord5 = "the"

            Case 6

                strWord6 = "the"

            Case 7

                strWord7 = "the"

            Case 8

                strWord8 = "the"

            Case 9

                strWord9 = "the"

            Case 10

                strWord10 = "the"

        End Select
        intword += 1
    End Sub

    Private Sub btnIs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIs.Click
        Select Case intword

            Case 1

                strWord1 = "is"

            Case 2

                strWord2 = "is"

            Case 3

                strWord3 = "is"

            Case 4

                strWord4 = "is"

            Case 5

                strWord5 = "is"

            Case 6

                strWord6 = "is"

            Case 7

                strWord7 = "is"

            Case 8

                strWord8 = "is"

            Case 9

                strWord9 = "is"

            Case 10

                strWord10 = "is"

        End Select
        intword += 1
    End Sub
    Private Sub btnSpeak_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSpeak.Click
        Select Case strWord1

            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord2
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord3
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord4
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord5
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord6
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord7
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord8
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

        Select Case strWord8
            Case "I"
                My.Computer.Audio.Play(My.Resources.word_I, AudioPlayMode.Background)
            Case "walk"
                My.Computer.Audio.Play(My.Resources.word_walk, AudioPlayMode.Background)
            Case "Dog"
                My.Computer.Audio.Play(My.Resources.word_dog, AudioPlayMode.Background)
            Case "cat"
                My.Computer.Audio.Play(My.Resources.word_cat, AudioPlayMode.Background)
            Case "fluffy"
                My.Computer.Audio.Play(My.Resources.word_fluffy, AudioPlayMode.Background)
            Case "is"
                My.Computer.Audio.Play(My.Resources.word_is, AudioPlayMode.Background)
            Case "see"
                My.Computer.Audio.Play(My.Resources.word_see, AudioPlayMode.Background)
            Case "the"
                My.Computer.Audio.Play(My.Resources.word_the, AudioPlayMode.Background)
        End Select

    End Sub


End Class

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 09:57PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month