473,480 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Should the order controls are added matter?

I've created a suite of custom controls/components. I have 3 assemblies, as
follows:

- Definitions.dll:
This contains classes and interfaces that are common to the other 2
assemblies. There are no controls/components in this dll

- ControlA.dll:
Contains the "root" control. Only has a reference to the Definitions dll

- ControlB.dll:
This control has a property of type ControlA. As such, if there is an
instance ControlA already on the form, you should select it via a dropdown
in the property editor of ControlB. There are different varieties of
ControlB, which all implement an interface contained in Definitions.dll,
which is why ControlA and ControlB are not bundled together. ControlB.dll
contains references to Definitions.dll and ControlA.dll.

If I add ControlA to a form in a test project first, it will automatically
add a reference to Definitions.dll in this test project and one to it's own
ControlA.dll (interesting aside: The fully qualified name for
Definitions.dll is title-case capitalized in the references list, however
the ControlA.dll fully qualified name is all lower case). However, when I
add ControlB and go to the property that is type ControlA, the existing
ControlA does not show up in the dropdown list. It appears as though it
doesn't recognize the type (i.e., some kind of invalid cast)

If I add ControlB first, it too adds the Definitions.dll to the references,
along with a reference to ControlA.dll and it's own ControlB.dll
(interesting aside part 2: now, the fully qualified names for
Definitions.dll and ControlA.dll are title-case capitialized, while
ControlB.dll is all lower case).
Then I add ControlA to the form. Now when I go to the property of ControlB
that is of type ControlA, the existing ControlA does show up in the
dropdown.

For some reason, the order in which the controls are added matters - why is
this???

If I don't use the property grid, and set the property of ControlB via code,
there is no type mismatch (regardless of the order of instantiation). You
would think that if the designer didn't pick up on the ControlA type, that
there would be some sort of invalid cast exception...

Thanks for any insight,

Derrick

Nov 22 '05 #1
0 696

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

Similar topics

0
870
by: Derrick | last post by:
I've created a suite of custom controls/components. I have 3 assemblies, as follows: - Definitions.dll: This contains classes and interfaces that are common to the other 2 assemblies. There...
5
2385
by: mytestemailaccount | last post by:
Hi, Hope you can help. I am relatively new to all this but would appreciate the groups help. The scenario: I am c# and asp.net to create a web application. The web page contains a user...
3
2677
by: JamesB | last post by:
Hi, I have a foreach... on a bunch of checkboxes in a groupbox. What order will this work in? I have to leave my processing on two of the checkboxes until after the others... is there any way to...
5
2222
by: Tom_F | last post by:
To comp.databases.ms-access -- I am trying to re-number the "tab index" for a large number of controls on a form. When I try to do this one control at a time, Access automatically re-numbers...
0
7054
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,...
1
6750
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
6993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4794
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...
0
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.