I'm fairly new to programming, and have a question about clearing labels. After the program has run once, I want to clear the text out of the labels as soon as the user touches anything on the form. The below code works just fine, but I know there must be a shorter way to say it. Thanks for any advise you have, appreciate it!!
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Me.Close() End Sub Private Sub radCoffee_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radCoffee.CheckedChanged ClearLabels() End Sub Private Sub radNoCoffee_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radNoCoffee.CheckedChanged ClearLabels() End Sub Private Sub radFilled_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radFilled.CheckedChanged ClearLabels() End Sub Private Sub radChocolate_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radChocolate.CheckedChanged ClearLabels() End Sub Private Sub radNoDonut_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radNoDonut.CheckedChanged ClearLabels() End Sub Private Sub radSugar_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radSugar.CheckedChanged ClearLabels() End Sub Private Sub radGlazed_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles radGlazed.CheckedChanged ClearLabels() End Sub End Class
Last edited by a moderator: