Dynamic Control Example for 2.0?

Tech-Archive recommends: Fix windows errors by optimizing your registry




Could someone provide a quick example for .NET 2.0 WinForms of how to
dynamically add a control "btnDynamic" to a form when button
"btnStandard" is clicked. I don't want to hardcode "btnDynamic" to the
form and make it simply visible, I don't want it to exist at runtime
until "btnStandard" is clicked, but when "btnDynamic" is created and
instantiated, it participates in the form's full event cycle and has
its own click event and etc.

Thanks.

.


Quantcast