user3538001
user3538001

Reputation: 3

Clearing number in a Label on Text Box Change

Just have a simple question. I have a program and in it I have a label that displays results once you calculate them, and I want the label to clear once you change the text in the input boxes. Assuming the label is named like lblResult or something, how would I go about doing this?

Upvotes: 0

Views: 1515

Answers (1)

vcsjones
vcsjones

Reputation: 141703

If you are using Windows Forms, you would handle the TextChanged event of your input box. In the event handler, you would then set your lblResult.Text = ""

If you are using WPF / XAML, the concept it the same, you'd just handle the event a little differently.

You can learn more about VB.NET and Event Handlers on MSDN.

Upvotes: 1

Related Questions