🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.language.delphi.dotnet
4 messages
4 total messages Started by Troy Bigelow Mon, 04 Aug 2008 18:47
Use Delphi.Net Package in Visual Studio
#185
Author: Troy Bigelow
Date: Mon, 04 Aug 2008 18:47
19 lines
1640 bytes
I have created a Delphi for .Net Project Package amd added some custom 
components.  I'm able to add these components to the Delphi .Net IDE and 
drop them on a VCL Form.

I would like to make these components available in the Visual Studio 2005 
IDE but I'm not having any luck adding them to the VS Toolbox.  The 
following error is reported when attempting to add the Delphi.Net package...

    There are no components in '<AssemblyName>' that can be placed on the 
toolbox.

I've added the [System.ComponentModel.ToolboxItemAttribute(true)] attribute 
to the Delphi component classes, but still no luck.

Does anyone have any suggestions of what to try next?

Thanks is advance!

Troy
Re: Use Delphi.Net Package in Visual Studio
#186
Author: Marc Rohloff [TeamB]
Date: Mon, 04 Aug 2008 19:04
18 lines
1849 bytes
On Mon, 4 Aug 2008 14:47:08 -0400, Troy Bigelow wrote:

> I have created a Delphi for .Net Project Package amd added some custom 
> components.  I'm able to add these components to the Delphi .Net IDE and 
> drop them on a VCL Form.

Are you trying to add controls or components?

Visual Studio uses Winforms controls which have a different control
hierarchy to the VCL controls. You cannot (easily) use a VCL control
in a Winforms application.

For components there are several requirements. One is to have a
parameterless public constructor.

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Re: Use Delphi.Net Package in Visual Studio
#187
Author: Troy Bigelow
Date: Mon, 04 Aug 2008 19:26
35 lines
2195 bytes
Marc,

Thanks for the quick response!

I'm a Delphi novice, so I'm sure what the difference is between a control or 
a component, sorry.  But the components(controls?) are inherited from 
TCustomControl, I suppose these must be controls!

Anyway, I can get the controls to "work" in VS through code by setting the 
ParentWindow property through code.

Thanks again!

Troy

"Marc Rohloff [TeamB]" <marc@nospam.marcrohloff.com> wrote in message 
news:ka93ewvud5jr$.dlg@dlg.marcrohloff.com...
> On Mon, 4 Aug 2008 14:47:08 -0400, Troy Bigelow wrote:
>
>> I have created a Delphi for .Net Project Package amd added some custom
>> components.  I'm able to add these components to the Delphi .Net IDE and
>> drop them on a VCL Form.
>
> Are you trying to add controls or components?
>
> Visual Studio uses Winforms controls which have a different control
> hierarchy to the VCL controls. You cannot (easily) use a VCL control
> in a Winforms application.
>
> For components there are several requirements. One is to have a
> parameterless public constructor.
>
> -- 
> Marc Rohloff [TeamB]
> marc -at- marc rohloff -dot- com 
Re: Use Delphi.Net Package in Visual Studio
#188
Author: Marc Rohloff [TeamB]
Date: Mon, 04 Aug 2008 20:17
19 lines
2025 bytes
On Mon, 4 Aug 2008 15:26:06 -0400, Troy Bigelow wrote:

> I'm a Delphi novice, so I'm sure what the difference is between a control or 
> a component, sorry.  But the components(controls?) are inherited from 
> TCustomControl, I suppose these must be controls!

To put it simply controls have a visual representation, components
don't. (The VCL also has the concept of a TWinControl which can has a
windows handle and can receive the focus and keyboard events)

> Anyway, I can get the controls to "work" in VS through code by setting the 
> ParentWindow property through code.

Yes, though there are often some issues caused by the differences in
the way windows messages and keyboard and mouse events are handled.

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads