You can't change the color of the titlebar without changing aspects of the visual style of the system or creating a new layout on a borderless form. If you would like to customize (add buttons, etc to the titlebar) or alter the tabcontrol appearance, I will point you to two of my articles:
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
I been trying to update my Listbox Control from importerCollection with no luck(importerCollection -class derived from List<importer>) .
Everytime I update/add item to my list, the LoadImporters() Method runs.
The problem is that it doesn't update my Listbox Control,
I been trying to use the Listbox.Refresh Method which didn't really worked.
The Only thing which worked is creating a new instance of ImporterCollection and settings the
Listbox datasource to this new instance.
I don't see any reason creating a new instance of it everytime I want to update/add Item in my List, it suppose to get update automatically.
I also have another problem, I dont know how to set the Databindings to update automatically. I think this problem might be the solution for the first problem
I will glad to hear some solutions to my problems. Thank you very much!
It's seems like no one had the answer to my questions,so I found it alone.
I want to share the solution with some guys who might have the problem too.
There are 2 ways to solve this problem, I will share what I found on the web.
The first one is by using a BindingSource as datasource instead of using your main datasource.
In my situation, it was "importerCollection", everytime an item is changed in the list you call the "bindingSource.ResetBindings(true)" Method.
The second solution for this problem is by using BindingList<> instead of List<>,
which can tell automatically if an object in your list has changed.
One problem I can see is that you don't have any logic listed to do the price subtraction.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
foreach(Control c in Controls)
ComboBox cb = c as ComboBox;
if (cb != null)
cb.SelectedIndex = 0;
this loops through ALL the controls on the current form, that's buttons, checkboxs, textboxes etc. There are a lot of controls on a form. So, as you're looping through, if you try and treat an object that is NOT a checkbox like a checkbox, it will error. Soooooo.... you test to see if the conversion to ComboBox worked. You can't easily select JUST ComboBoxes from a form, you have to go through the controls.
First, your delegate doesn't need to conform to the object/eventargs model, it can have any signature.
Second, it looks like you're trying to pass the listbox to the delegate. Why ? That misses the whole point. The point is, your delegate method should fire in the scope of the listbox, and the code to work with the listbox should run locally. If you're going to pass the listbox, the code could be anywhere, so why use delegates ?
No longer a Microsoft MVP, but still happy to answer your questions.
Thanks, but even so when I start the program it still doesn't pass on the message, start button activtes the begin button whic should send a message a that is not happening whether I use a delegate or not, yet the begin button will load a message.