Practical steps to creating user controls

J

Joe

Hi,
I am adding a custom user control to my c# project, but I seem to missing
some basic concepts.

As I understand it, I create the custom control project, but I have to add
this to the tool bar by browsing for the .DLL.

So I grab the bin/debug dll, add the control to my form and go about my
business.

Now, when I'm ready to ship, and I change to a retail build, but isn't the
form still using the debug version of the user control?

Is it really necessary to delete the control from my form and re-add the
retail version - and fix/rebuild whatever code gets broken by this (ie
events unhooked and potential name changes)?

Thanks,
Joe
 
J

Jeff Gaines

Hi,
I am adding a custom user control to my c# project, but I seem to
missing some basic concepts.

As I understand it, I create the custom control project, but I have
to add this to the tool bar by browsing for the .DLL.

So I grab the bin/debug dll, add the control to my form and go about
my business.

Now, when I'm ready to ship, and I change to a retail build, but
isn't the form still using the debug version of the user control?

Is it really necessary to delete the control from my form and re-add
the retail version - and fix/rebuild whatever code gets broken by
this (ie events unhooked and potential name changes)?

Thanks,
Joe

That is the case unfortunately, unless you can write the control,
guarantee it's bug free and you won't want to change it, then you can
compile the release version of the control and add that to the toolbox.
Life's not like that though :)

Do you have to compile it as a dll and add it to the toolbox? Could you
not just include its source in your project? That way it's much easier
to update, and in your final release build both the control and main
app can be compiled together as a release version.

The down side is you need to add it to your form programmatically,
rather than visually, although I have found with my own controls that
this can be much easier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top