Skip to content

Showing the result of a radio button in a messagebox

Ben Binyamin

Asked Jun 4, 2008, 3:25 AM EDT2 answers
Share
LinkedInX

I would like to Show which radio button has been selected in a messagebox. ie. (radio button name is "Small" i want to show Small in a message box if the Radio button is selected in VB.net.

iam new to vb if anyone can help please let me know

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Niradhip Chakraborty
    0

    Say your radiobutton Id is rdSmall.

                    If rdSmall.Checked = true  Then
                       
                          MessageBox.Show("Small")
                     
                     End If
     Make sure you are using windows application because MessageBox.Show only works in windows application.

    0
  • 0

    thanks for that, but i thing i didnt explain my question good.

    what i have is a pizza ordering program that i select a pizza from a list eg "Vegetarian" and then select the size of the pizza from the 3 radio buttons "Large" then you click on calculate to show the cost. that is the first pizza of the order.

    then i click on clear it clears the cost and what i have selected, now i select another pizza from the list ie "hawaiian" and i select the size as "small" from the 3 radio buttons which are (small, medium, Large).

    what i want to show in the messagebox are the details of the customer eg name, address, etc the cost of the order eg "total cost" $30.00 i can do all this, what i cant do is to show what pizza's i've order so i want to show eg. "you have ordered" and under this i want to show Vegetarian - Large & Hawaiian - Small. because i've clear the first pizza ordered from the form i dont know how to show it in a messagebox and also not sure how to show radiobuttons with a message.

    hope this will explain it better.  

    0