Hello,
How to reset the properties of the form as well as all of the control properties values when i click a button. Thanks in advanced..

What you mean by reseting form and its controls? Pass more info on what u need exactly.

I attached the picture of the system I've been working on.Base on what you see, there are many link labels. What I want is, when I search a particular workstation, it's color will change. And when I search another workstation, the later searched workstation will reset its property. I already have the codes for changing the color of the workstation that I want to search. I only need the codes for resetting the property of link label.

Attachments Capture.PNG 145.6 KB

Write one more method to change the colr or proprties of linklable. i dont think there is way to set it back automatically.

Or you can do something like this

For Each contr As Control In Me.Controls
                If TypeOf contr Is TextBox Then
                    contr.BackColor = Control.DefaultBackColor
                End If
            Next

I have done for textbox. You can use for lable or any other controls who's property u want to set to default.

Or you can do something like this

For Each contr As Control In Me.Controls
                If TypeOf contr Is TextBox Then
                    contr.BackColor = Control.DefaultBackColor
                End If
            Next

I have done for textbox. You can use for lable or any other controls who's property u want to set to default.

Thanks for this one dude.. :icon_smile:

This question has already been answered. Start a new discussion instead.