473,725 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating embedded classes .NET components

I am creating a component and I want one of my properties to be an embedded
class with its own properties. When the component designer shows this
property I want it to be able to expand this property in-line to enable the
end-user to set its values. While my component is derived from
System::Compone ntModel::Compon ent, my embedded class has to be derived from
something else in order for it to be shown as an embedded class but be
serializable and marshallable at the same time. What is this something else
? Does my embedded class need to be of a value type to be embedded in this
way or does it just need to be derived from a different .NET framework base
class ?

As an example in C++ Builder, if I derived my component from TComponent, it
was treated as a component. If I derived my class from TPersistent, it was
treated as an embeddable class. What is the .NET equivalent to the latter ?
Jul 21 '05 #1
3 1439
http://msdn.microsoft.com/library/en...etpropbrow.asp
Make Your Components Really RAD with Visual Studio .NET Property Browser
Summary: This article will help you explore the Microsoft Visual Studio .NET
property browser and take advantage of its new features. (23 printed pages)

Check out this section:
Expandable Properties and String Conversion: TypeConverters and the Property
Browser
One of the great features of the Visual Studio .NET property browser is the
ability to display nested properties, allowing for a more granular and
logical level of grouping than categories. Nested properties are also
available in both categorized and alphabetical sort mode. It helps keep
property lists compact-instead of both a Left and Top property, just a
Location property that is expandable into X and Y will do for a separate
entry.
--
Greetz
Jan Tielens
_______________ _______________ __
Read my weblog: http://weblogs.asp.net/jan
"Edward Diener" <ed******@tropi csoft.com> wrote in message
news:eH******** ******@TK2MSFTN GP09.phx.gbl...
I am creating a component and I want one of my properties to be an embedded class with its own properties. When the component designer shows this
property I want it to be able to expand this property in-line to enable the end-user to set its values. While my component is derived from
System::Compone ntModel::Compon ent, my embedded class has to be derived from something else in order for it to be shown as an embedded class but be
serializable and marshallable at the same time. What is this something else ? Does my embedded class need to be of a value type to be embedded in this
way or does it just need to be derived from a different .NET framework base class ?

As an example in C++ Builder, if I derived my component from TComponent, it was treated as a component. If I derived my class from TPersistent, it was
treated as an embeddable class. What is the .NET equivalent to the latter ?

Jul 21 '05 #2
Jan Tielens wrote:
http://msdn.microsoft.com/library/en...etpropbrow.asp
Make Your Components Really RAD with Visual Studio .NET Property
Browser Summary: This article will help you explore the Microsoft
Visual Studio .NET property browser and take advantage of its new
features. (23 printed pages)
Thanks for the link. I see I have the article on my own local copy of MSDN
and I will take a look at it. If I still can't find answers in the article,
I will continue this thread or repost.

Check out this section:
Expandable Properties and String Conversion: TypeConverters and the
Property Browser
One of the great features of the Visual Studio .NET property browser
is the ability to display nested properties, allowing for a more
granular and logical level of grouping than categories. Nested
properties are also available in both categorized and alphabetical
sort mode. It helps keep property lists compact-instead of both a
Left and Top property, just a Location property that is expandable
into X and Y will do for a separate entry.

"Edward Diener" <ed******@tropi csoft.com> wrote in message
news:eH******** ******@TK2MSFTN GP09.phx.gbl...
I am creating a component and I want one of my properties to be an
embedded class with its own properties. When the component designer
shows this property I want it to be able to expand this property
in-line to enable the end-user to set its values. While my component
is derived from System::Compone ntModel::Compon ent, my embedded class
has to be derived from something else in order for it to be shown as
an embedded class but be serializable and marshallable at the same
time. What is this something else ? Does my embedded class need to
be of a value type to be embedded in this way or does it just need
to be derived from a different .NET framework base class ?

As an example in C++ Builder, if I derived my component from
TComponent, it was treated as a component. If I derived my class
from TPersistent, it was treated as an embeddable class. What is the
.NET equivalent to the latter ?

Jul 21 '05 #3
Jan Tielens wrote:
http://msdn.microsoft.com/library/en...etpropbrow.asp
Make Your Components Really RAD with Visual Studio .NET Property
Browser Summary: This article will help you explore the Microsoft
Visual Studio .NET property browser and take advantage of its new
features. (23 printed pages)
That doesn't really answer my question. Let's see if I can put it another
way.

Let's call my main component, with properties, X.
I want to create two different types of properties:

1) This property called Y is a reference to another component Z. The
property gets set at component design time by the end-user dropping the
component Z into the component editor, setting Z's properties, then setting
Y to be the Z.

2) This property called A is an actual sub-component of X. The property gets
set at component design time by the end-user expand the sub-component and
setting its property values.

Does property A have to be a value type ( struct in C#, __value class in
MC++ ) in order to be a sub-component ? If not, how do I distinguish between
the case where my property is a reference to another component or a
sub-component itself ?

I hope this is clear.

"Edward Diener" <ed******@tropi csoft.com> wrote in message
news:eH******** ******@TK2MSFTN GP09.phx.gbl...
I am creating a component and I want one of my properties to be an
embedded class with its own properties. When the component designer
shows this property I want it to be able to expand this property
in-line to enable the end-user to set its values. While my component
is derived from System::Compone ntModel::Compon ent, my embedded class
has to be derived from something else in order for it to be shown as
an embedded class but be serializable and marshallable at the same
time. What is this something else ? Does my embedded class need to
be of a value type to be embedded in this way or does it just need
to be derived from a different .NET framework base class ?

As an example in C++ Builder, if I derived my component from
TComponent, it was treated as a component. If I derived my class
from TPersistent, it was treated as an embeddable class. What is the
.NET equivalent to the latter ?

Jul 21 '05 #4

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

Similar topics

6
7377
by: Troy | last post by:
Hi- I am attempting to set up an RSS feed using PHP. It would be convenient for me to embed PHP into an xml file like I would do to an HTML file in order to create the XML, however the apache server does not realize that it's PHP content and the PHP engine is not run against that code. so I have to call it feed.php instead of feed.xml, and most of the rss readers don't appreciate this. My alternative is to create the XML file every...
1
1617
by: billym | last post by:
Is there any information on building BLL middle tier applications to run in an MSCS configuration? IOW, I am not just interested in scalability but fault tolerence as well but am unsure if there are design issues that must be baked in from the beginning in order for this to work?
1
7985
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script : VBScript and Javascript Client : 1. IE browser. 2. VBForm embedded with WebBrowser control (MS Internet
1
4297
by: Tom Tempelaere | last post by:
Hi people, Somewhere in the near future I will have to develop a kernel for an industrial printer. Some parts of the kernel have real-time constraints, other parts do not. The kernel should be executed in (what my proj. mgr. calls) embedded XP. I assume he means XP CE, although I am not sure (my mgr. is hardly around). I was wondering if any of the people around here have ever done such an embedded project using C# / .NET?
1
974
by: John Cosmas | last post by:
I am new to .NET 2003 and I'm having trouble locating answers. I need to run a initiate a set of classes, or rather load some initial values into an array - data originates from a database. Then throughout my application, I will make a functional call which will retrieve the corresponding value based on the key/parameter I send into the function. Please tell me or refer me to a document that describes how to create this class or...
3
295
by: Edward Diener | last post by:
I am creating a component and I want one of my properties to be an embedded class with its own properties. When the component designer shows this property I want it to be able to expand this property in-line to enable the end-user to set its values. While my component is derived from System::ComponentModel::Component, my embedded class has to be derived from something else in order for it to be shown as an embedded class but be...
12
3162
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
4
2294
by: Scott McNair | last post by:
Hi, I'm creating a user control that has absolutely no visual pieces to it... it's essentially a piece that sniffs a serial port awaiting incoming data. I know that there are several controls that come natively with .NET that don't actually reside on the form, but go to the bottom area, such as for example database-related controls. How would I go about setting my own control to do just that? Otherwise I'm left with the quandary of...
0
4753
MrMancunian
by: MrMancunian | last post by:
How to create a database connection without using wizards Introduction I've seen a lot of questions on the net about getting data from, and saving data to databases. Here's a little insight how to do that using .NET code. I prefer using code instead of wizards, because you are completely in charge of connections. This article is written for both Visual Basic.NET 2005 and C# 2005 and will discuss how to use an MS Sql database. OleDB works...
0
8889
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8099
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.