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..

Recommended Answers

All 5 Replies

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.

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:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.