• 0

Vb Question!


Question

Hey all. I am making a Typing Tutor game... it's my chapters project. Well, I have a question...

I have it so, when a user clicks a Radio Button, it changes the level, etc. Well, after they click the button, I have a message box pop up saying something like "GODLIKE!" or "Really easy..." etc. Here's my problem:

Say that RadioButton3 is checked. The message box pops up, yadda yadda. So then, you deicde to check RadioButton8. Now, the message box that pops up for Radiobutton3 pops up, I click ok, and THEN the message that is supposed to pop up for RadioButton8 shows up.

Why is this happening? The RadioButton code goes like this:

Private Sub RadioButton10_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton10.CheckedChanged
        Timer1.Interval = 225
        MsgBox("WICKED SICK!")
        Label1.Text = "unicode"
        Label2.Text = "dictionary"
        Label3.Text = "documents"
        Label4.Text = "gargantuan"
        Label5.Text = "suspension"

Help appreciated, as I am a total n00b to programming! :)

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

CheckedChanged is the event that your subroutine is handling. That includes having the box being checked OR being unchecked. What you might do instead is to put an If statement that checks the condition prior to showing the MsgBox.

...Handles RadioButton.CheckedChanged

If RadioButton.Checked = True Then

SHOW YOUR FORM

End If

End Sub

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.