I need to know to turn off a combobox, and a trackBar! I explain, when you select an item from a combobox, I would like to disable another combobox and a trackbar in the same form ... Who can help me?:S

Well what have you tried so far?, sounds simple enough. What exactly are you stuck on?

rather it is simple, just do not know the "code" to block a combobox and a trackbar (eg. combobox6.***), that you can not move these components, yhat you cant select an item...You know what I mean??

Yes, is how to disable it...But I dont know how to do it!!I already tried to make comboBox6.MaxDropDownItems = 0, but we can not ...

It's easy my fellow programmer.

First you want to component to hide when something else happens right? Then here's what you do:

Click on the component you want and on the properties slab (press F4) click on the Lightning Bolt (4th icon from the right).

There you will see a big list of events, just choose the one that fits best for your situation and then press enter or double click it to be taken to the programming part of that particular event. Everything your program here will happen ONLY when your event takes place.

Then it's just a matter of programming the .enabled part of the control to activate / deactivate or the .visible to show / hide it.

For instance.

private void comboBox1_Enter(object sender, EventArgs e)
        {
            //Hides ComboBox 2.
            comboBox2.Visible = false;
        }

I dont think he wants it hidden, but disabled.. but its not like you havent told him the right thing, it would just seem the opposite of disabled isnt the same the world over.

Thank you all, the two ideas will be useful ... I dont know how I have not reminded of something so obvious, but thanks again!

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