|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Practical steps to creating user controlsI 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 On 22/11/2004 Joe wrote:
Show quote > Hi, That is the case unfortunately, unless you can write the control,> 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 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. -- Jeff Gaines Damerham Hampshire OK - thanks - that is kind of what I came up with as well - I just thought I
was missing something as this seems rather fundamental. Joe Show quote "Jeff Gaines" <whitedragon@newsgroup.nospam> wrote in message news:xn0dq2qx4euad2002@news.microsoft.com... > On 22/11/2004 Joe wrote: > >> 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. > > -- > Jeff Gaines Damerham Hampshire |
|||||||||||||||||||||||