Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use Delphi.Net Package in Visual Studio

2 views
Skip to first unread message

Troy Bigelow

unread,
Aug 4, 2008, 2:47:08 PM8/4/08
to
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


Marc Rohloff [TeamB]

unread,
Aug 4, 2008, 3:04:06 PM8/4/08
to
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

Troy Bigelow

unread,
Aug 4, 2008, 3:26:06 PM8/4/08
to
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]" <ma...@nospam.marcrohloff.com> wrote in message
news:ka93ewvud5jr$.dlg@dlg.marcrohloff.com...

Marc Rohloff [TeamB]

unread,
Aug 4, 2008, 4:17:48 PM8/4/08
to
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.

0 new messages