473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

User control but not from toolbox

Hello all,

I hope someone can help me. I am not new to developing but am new to
C# (assemblies etc) and V Studio 2003, although familiar with
terminology from VS6.

I am in the nightmare scenario of picking up half written code
without comments. This is what I have done.
The original 'Solution' contained only 1 project and several
references to 'Release' build assembly files. This was no good as I
couldn't step through the code in the debugger.

So I added the projects containing the source for the references to
the solution and then recreated the references as project references.

So far so good, I can now step through the code.

But now for some reason (maybe it was something I did, I am not sure)
my dialog boxes which contain user controls (these user controls being
made in the additional projects I previsouly mentioned) no longer have
these user controls - I thnk VS in it's wisdom removed them.
This is my problem:-
I understand that to drag and drop these controls back onto my dialog
box I do so from the toolbox. But they are not on the toolbox.

I also understand I can add the built assemblies to the toolbox so I
then can drag and drop them onto my dialog. But I am sceptical.
These controls are now a part of my solution. If I never store the
built binaries and only the source, how would a fresh source safe
retrieval populate the toolbox with my user controls again? And how
would I ensure debug code was used for a debug build and release code
for a release build if I explicited added a release binary to the
toolbox?

I hope that makes sense.

I think, in other words, what I would like to do, is add the project
to the toolbox so it knows if to use release of debug, in the same way
you add a project reference.

Any thoughts on this would be greatly appreciated.

Thanks in advance.
Kevin Mellor
k.******@iee.org (e-mail accepted but prefer reply to post so others
can benefit)
Nov 16 '05 #1
3 4337
Kevin,

Are the controls still there at runtime? Is the source code still valid (it
compiles).

The developers on my dev team have been struggling with these types of
issues each time the external assemblies which contain referenced user
controls are recompiled (the incremented version numbers of the new DLL's
seem to throw off the design mode of VS.Net).

One thing I might suggest is, close down your project - and go into the
bin/debug or bin/build directories of the project with the dialogs that no
longer want to paint in the IDE - and delete all the DLL's. Then reopen the
project and rebuild all - forcing the projects DLL versions to be rebuilt
and copied local to the run directory again.

We have found while diagnosing similar problems that the DLL's get locked
when they are being displayed in the IDE - and then a 'rebuild' will not
copy the new DLL's to the bin/debug or bin/release directory - leaving you
to think new copies were posted into those directories - but they aren't -
and the out of synch versions cause them to be undisplayable in the IDE.

"Kevin Mellor" <k.******@iee.org> wrote in message
news:10**************************@posting.google.c om...
Hello all,

I hope someone can help me. I am not new to developing but am new to
C# (assemblies etc) and V Studio 2003, although familiar with
terminology from VS6.

I am in the nightmare scenario of picking up half written code
without comments. This is what I have done.
The original 'Solution' contained only 1 project and several
references to 'Release' build assembly files. This was no good as I
couldn't step through the code in the debugger.

So I added the projects containing the source for the references to
the solution and then recreated the references as project references.

So far so good, I can now step through the code.

But now for some reason (maybe it was something I did, I am not sure)
my dialog boxes which contain user controls (these user controls being
made in the additional projects I previsouly mentioned) no longer have
these user controls - I thnk VS in it's wisdom removed them.
This is my problem:-
I understand that to drag and drop these controls back onto my dialog
box I do so from the toolbox. But they are not on the toolbox.

I also understand I can add the built assemblies to the toolbox so I
then can drag and drop them onto my dialog. But I am sceptical.
These controls are now a part of my solution. If I never store the
built binaries and only the source, how would a fresh source safe
retrieval populate the toolbox with my user controls again? And how
would I ensure debug code was used for a debug build and release code
for a release build if I explicited added a release binary to the
toolbox?

I hope that makes sense.

I think, in other words, what I would like to do, is add the project
to the toolbox so it knows if to use release of debug, in the same way
you add a project reference.

Any thoughts on this would be greatly appreciated.

Thanks in advance.
Kevin Mellor
k.******@iee.org (e-mail accepted but prefer reply to post so others
can benefit)

Nov 16 '05 #2
Jediah,

many thanks for your reply. Sadly it does not easily solve my
problem but has certainly given me some things to try out and think
about.

If I were to do what you suggest - when adding controls to the
toolbox should I add the locally copied Release build references to
the toolbox. If so, what then if I wish to debug.

Does anyone know what the problem actually is here. I find it hard
to believe that this is an oversight on Microsofts part. Is it more a
case of what I am trying to do is "wrong" in the context of .NET
development.

Regards

Kevin

"Jediah L." <ri**@nospam.nospam> wrote in message news:<Om**************@TK2MSFTNGP11.phx.gbl>...
Kevin,

Are the controls still there at runtime? Is the source code still valid (it
compiles).

The developers on my dev team have been struggling with these types of
issues each time the external assemblies which contain referenced user
controls are recompiled (the incremented version numbers of the new DLL's
seem to throw off the design mode of VS.Net).

One thing I might suggest is, close down your project - and go into the
bin/debug or bin/build directories of the project with the dialogs that no
longer want to paint in the IDE - and delete all the DLL's. Then reopen the
project and rebuild all - forcing the projects DLL versions to be rebuilt
and copied local to the run directory again.

We have found while diagnosing similar problems that the DLL's get locked
when they are being displayed in the IDE - and then a 'rebuild' will not
copy the new DLL's to the bin/debug or bin/release directory - leaving you
to think new copies were posted into those directories - but they aren't -
and the out of synch versions cause them to be undisplayable in the IDE.

Nov 16 '05 #3
Finally I have begun to make some progress.

I hope this does not sound patronising but I have discovered that in
the situation I described above, the controls in the other projects
should have been made available in the toolbox automatically under the
title "My User Controls".

This did not happen, and there are a few threads about this already so
I won't duplicate my questions here.

Although what is frustrating is to get the My User Controls to
recognise my code I had to delete my sources from the projects, readd
the sources to the project, and then cut and paste my original files
over the ones the wizard created.

If anyone can point me in the direction of some useful resources, or
if anyone has an answer/fix/workaround for this problem, please let me
know. Any suggestion welcomed.

Regards

Kevin Mellor
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Henke | last post by:
I added a project to my solution that contains a user control. Now I 'd like to add the user control from that project to a form in my solution. The problem is that the control doesn't gets added...
4
by: Paradox | last post by:
Hey, I'm trying to figure out what situations call for the use of a derived form control such as: public class myListBox : System.Windows.Forms.ListBox and what situations call for the use...
3
by: ABC | last post by:
I created a web user controls on the same project. When I recompiled, I cannot found my web user controls on toolbox. What happen?
0
by: Philippe Meunier | last post by:
Hi, I am building a solution in VB.NET, and one of the project in the solution contains my user controls (and inherited controls), Everything is ok when I just came to add the user control and...
1
by: Philippe Meunier | last post by:
Ok, I already asked a question similar to this one but didn't found any answer ! I've a solution with 2 projects in it. One of the project contains Usercontrols and Inherited Controls. I work...
1
by: Shawn Eary | last post by:
Hello Everyone: I used VB.NET 2003 Standard to create a User Control which I named PersonControl and then overrode its OnLoad routine to use SQL commands to populate its sub-controls. When I...
4
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
5
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
0
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
2
by: Carl Johansson | last post by:
I'm trying to learn how to create a user control. As far as I can understand, Visual Studio contains a template named "Windows Control Library" to this end. However, this template is missing when I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.