How to add COM component in Delphi Prism design form?

In MS Visual Studio Shell 2010 (Delphi Prism IDE), i want to use a vector graphic tool either VeCAD or LiteCAD.
But both of them are OCX / DLL files.
They are shown in toolbox (choose item option), as COM component, not as .Net Framework component.

How to use COM component into Delphi Prism?

these component also shown in toolbox items.
But i can't drag them on design form. 
it gives error 
"Failed to create component AxHost. 
System.Reflection.TargetInvocationException: COM target doest not implement IDispatch"

What is the reason behind it? 
How to solve this problem?
0
Khyati
12/2/2010 7:22:45 AM
embarcadero.delphiprism.lang 246 articles. 0 followers. Follow

8 Replies
1373 Views

Similar Articles

[PageSpeed] 12
Get it on Google Play
Get it on Apple App Store

On 2-12-2010 8:22, Khyati Motawar wrote:
> In MS Visual Studio Shell 2010 (Delphi Prism IDE), i want to use a vector graphic tool either VeCAD or LiteCAD.
> But both of them are OCX / DLL files.
> They are shown in toolbox (choose item option), as COM component, not as .Net Framework component.
>
> How to use COM component into Delphi Prism?
>
> these component also shown in toolbox items.
> But i can't drag them on design form.
> it gives error
> "Failed to create component AxHost.
> System.Reflection.TargetInvocationException: COM target doest not implement IDispatch"
>
> What is the reason behind it?
> How to solve this problem?

Not sure about the error for these particular components. You could just 
use them from code though. Add a COM reference in the Add References dialog.

--
Carlo Kok
0
Carlo
12/6/2010 8:58:33 AM
If it can't find IDispatch, I wonder if it CAN be called in code.
0
Mark
12/6/2010 1:24:34 PM
> {quote:title=Mark Tiede wrote:}{quote}
> If it can't find IDispatch, I wonder if it CAN be called in code.

i tried to add VeCAD component by "Add Reference" dialog.
But it seems the code cant call it.

it gives error of undefined specification/methods etc.

Do we require to add any code to invoke that VeCAD component after adding as reference.
0
Khyati
12/7/2010 3:51:12 AM
On 7-12-2010 4:51, Khyati Motawar wrote:
>> {quote:title=Mark Tiede wrote:}{quote}
>> If it can't find IDispatch, I wonder if it CAN be called in code.
>
> i tried to add VeCAD component by "Add Reference" dialog.
> But it seems the code cant call it.
>
> it gives error of undefined specification/methods etc.
>
> Do we require to add any code to invoke that VeCAD component after adding as reference.

Just a uses entry to the right namespace. (Not sure what it will be, 
code completion should show it for that particular library)

--
Carlo Kok
0
Carlo
12/7/2010 8:41:38 AM
> {quote:title=Carlo Kok wrote:}{quote}
> On 7-12-2010 4:51, Khyati Motawar wrote:
> >> {quote:title=Mark Tiede wrote:}{quote}
> >> If it can't find IDispatch, I wonder if it CAN be called in code.
> >
> > i tried to add VeCAD component by "Add Reference" dialog.
> > But it seems the code cant call it.
> >
> > it gives error of undefined specification/methods etc.
> >
> > Do we require to add any code to invoke that VeCAD component after adding as reference.
> 
> Just a uses entry to the right namespace. (Not sure what it will be, 
> code completion should show it for that particular library)
> 
> --
> Carlo Kok

technologies/language which are not originally based on .net concept.. but they also support for .net component and .net assembly for better interest of user/developer.
Why Delphi Prism (.net language) not support old COM components?
Isn't it backward compatibility?
0
Khyati
12/10/2010 3:42:19 AM
On 10-12-2010 4:42, Khyati Motawar wrote:
>> {quote:title=Carlo Kok wrote:}{quote}
>> On 7-12-2010 4:51, Khyati Motawar wrote:
>>>> {quote:title=Mark Tiede wrote:}{quote}
>>>> If it can't find IDispatch, I wonder if it CAN be called in code.
>>>
>>> i tried to add VeCAD component by "Add Reference" dialog.
>>> But it seems the code cant call it.
>>>
>>> it gives error of undefined specification/methods etc.
>>>
>>> Do we require to add any code to invoke that VeCAD component after adding as reference.
>>
>> Just a uses entry to the right namespace. (Not sure what it will be,
>> code completion should show it for that particular library)
>>
>> --
>> Carlo Kok
>
> technologies/language which are not originally based on .net concept.. but they also support for .net component and .net assembly for better interest of user/developer.
> Why Delphi Prism (.net language) not support old COM components?
> Isn't it backward compatibility?

Hm? .NET (and with it Delphi Prism) supports COM objects just fine. It 
doesn't do a "Component" wrapper you can click on your form though.

--
Carlo Kok
0
Carlo
12/10/2010 7:12:50 AM
> {quote:title=Carlo Kok wrote:}{quote}
> On 10-12-2010 4:42, Khyati Motawar wrote:
> >> {quote:title=Carlo Kok wrote:}{quote}
> >> On 7-12-2010 4:51, Khyati Motawar wrote:
> >>>> {quote:title=Mark Tiede wrote:}{quote}
> >>>> If it can't find IDispatch, I wonder if it CAN be called in code.
> >>>
> >>> i tried to add VeCAD component by "Add Reference" dialog.
> >>> But it seems the code cant call it.
> >>>
> >>> it gives error of undefined specification/methods etc.
> >>>
> >>> Do we require to add any code to invoke that VeCAD component after adding as reference.
> >>
> >> Just a uses entry to the right namespace. (Not sure what it will be,
> >> code completion should show it for that particular library)
> >>
> >> --
> >> Carlo Kok
> >
> > technologies/language which are not originally based on .net concept.. but they also support for .net component and .net assembly for better interest of user/developer.
> > Why Delphi Prism (.net language) not support old COM components?
> > Isn't it backward compatibility?
> 
> Hm? .NET (and with it Delphi Prism) supports COM objects just fine. It 
> doesn't do a "Component" wrapper you can click on your form though.
> 
> --
> Carlo Kok

Ok.
then how does it support a COM component ?
Can we run it through .dll / ocx object? through API? 
Or required a specific code to be written to include them?
0
Khyati
12/10/2010 8:01:08 AM
On 10-12-2010 9:01, Khyati Motawar wrote:
>> {quote:title=Carlo Kok wrote:}{quote}
>> On 10-12-2010 4:42, Khyati Motawar wrote:
>>>> {quote:title=Carlo Kok wrote:}{quote}
>>>> On 7-12-2010 4:51, Khyati Motawar wrote:
>>>>>> {quote:title=Mark Tiede wrote:}{quote}
>>>>>> If it can't find IDispatch, I wonder if it CAN be called in code.
>>>>>
>>>>> i tried to add VeCAD component by "Add Reference" dialog.
>>>>> But it seems the code cant call it.
>>>>>
>>>>> it gives error of undefined specification/methods etc.
>>>>>
>>>>> Do we require to add any code to invoke that VeCAD component after adding as reference.
>>>>
>>>> Just a uses entry to the right namespace. (Not sure what it will be,
>>>> code completion should show it for that particular library)
>>>>
>>>> --
>>>> Carlo Kok
>>>
>>> technologies/language which are not originally based on .net concept.. but they also support for .net component and .net assembly for better interest of user/developer.
>>> Why Delphi Prism (.net language) not support old COM components?
>>> Isn't it backward compatibility?
>>
>> Hm? .NET (and with it Delphi Prism) supports COM objects just fine. It
>> doesn't do a "Component" wrapper you can click on your form though.
>>
>> --
>> Carlo Kok
>
> Ok.
> then how does it support a COM component ?
> Can we run it through .dll / ocx object? through API?
> Or required a specific code to be written to include them?

Looks like COM objects don't show in Code Completion properly (logged as 
a bug)

Try this:

Find your com dll, either as a DLL, OCX or .TLB file. Run tlbimp.exe 
(part of the .NET sdk, I have it in C:\Program Files 
(x86)\Microsoft.NET\SDK\v2.0\Bin)

For example with the TaskScheduler api:

"C:\Program Files (x86)\Microsoft.NET\SDK\v2.0\Bin\TlbImp.exe" 
"c:\Windows\SysWOW64\taskschd.dll" /out:Import.TaskScheduler.dll 
/namespace:TaskScheduler

(one line).

This creates an Import.TaskScheduler.dll, in the references you can add it:

http://rorox.remobjects.com/Carlo/2010-12-10_0938.swf

Let me know if that helps.

--
Carlo Kok
0
Carlo
12/10/2010 8:38:43 AM
Reply:

Similar Artilces:

how to use COM component in Delphi Prism?
In MS Visual Studio Shell 2010 (Delphi Prism IDE), i want to use a vector graphic tool either VeCAD or LiteCAD. But both of them are OCX / DLL files. They are shown in toolbox (choose item option), as COM component, not as .Net Framework component. How to use COM component into Delphi Prism? these component also shown in toolbox items. But i can't drag them on form. it gives error "Failed to create component AxHost. System.Reflection.TargetInvocationException: COM target doest not implement IDispatch" What is the reason behind it? How to solve this problem? ...

how to add components using windows form designer
using VB Net 2005, I have already added the AxTWSLib.AxTws as a reference, I need to put these two lines into the form Public WithEvents Tws1 As AxTWSLib.AxTws this goes into initializeComponents Me.Tws1 = New AxTWSLib.AxTws but in the code it says the following NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. how do I add these lines usign the Windows Form Designer ? I am new to VB Net programming...

Delphi Component Design
Danny Thorpe's Book "Delphi Component Design" is always a tough find, but this one is autographed to boot: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=200440598587&ssPageName=STRK:MESELX:IT -- Nick Hodges Delphi R&D Manager Embarcadero On 2/17/2010 3:18 PM, Nick Hodges wrote: > Danny Thorpe's Book "Delphi Component Design" is always a tough find, but this one is autographed to boot: > > http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=200440598587&ssPageName=STRK:MESELX:IT > Wow! The current bidding is even ...

Editing PB Component Properties adds com.sybase.jaguar.component.iso_level property
Whenever we use Jaguar Manager (EAS 4.2.2) to set a component property on a PowerBuilder component the following property is appended automatically: com.sybase.jaguar.component.iso_level=serializable From what I read on a Sybase document the property creates problems. Anyone experiencing this? TIA A. This is a multi-part message in MIME format. --------------090406010200000407040509 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Aggelos Paraskevopoulos wrote: > Whenever we use Jaguar Manager (EAS 4.2.2) to set a component ...

Any difference between Delphi Prism 2011 and Delphi Prism XE?
Looking at the features in Delphi Prism XE, they look the same as the new items in the 2011 release back in may. I there anything new in the XE release? or did they simply change the product branding? Just wondering if I need to update it or now when i download the rest. Thanks, Hi Dan, > Looking at the features in Delphi Prism XE, they look the same as the new items in the 2011 release back in may. I there anything new in the XE release? or did they simply change the product branding? Just wondering if I need to update it or now when i download the rest. See http://w...

COM/COM+ Components
We are planning to deprecate the COM/COM+ component wizard in PowerBuilder 11.5. Alternatives are deploying your NVO as a .NET Web Service or as a .NET Assembly. Would removing this feature have an impact on you? Regards, Dave Fish Sybase PowerBuilder Blog: http://powerbuilderevangelist.blogspot.com/ Dave; By this you mean allowing PB to build a COM Server? Chris "Dave Fish [TeamSybase]" <n0Spam__dfish@sybase.com> wrote in message news:gm2j24hk7o0pedrhc3kudlg2tqdgs8hjei@4ax.com... > We are planning to deprecate the COM/COM+ component wizard i...

COM/COM+ Components
We are planning to deprecate the COM/COM+ component wizard in PowerBuilder 11.5. Alternatives are deploying your NVO as a .NET Web Service or as a .NET Assembly. Would removing this feature have an impact on you? Regards, Dave Fish Sybase PowerBuilder Blog: http://powerbuilderevangelist.blogspot.com/ Yes certanily. We are using many many COM/COM+ components. "Dave Fish [TeamSybase]" <n0Spam__dfish@sybase.com> ha scritto nel messaggio news:ch2j24tdfqbfua264mmrnu2d3isrm1clug@4ax.com... > We are planning to deprecate the COM/COM+ component wizard in >...

COM/COM+ component
Hi Does anyone have an simple example of COM/COM+ component and the way to use it ? cheer <Muriel> wrote in message news:417783cf.293.1681692777@sybase.com... > Hi > > Does anyone have an simple example of COM/COM+ component and > the way to use it ? > > cheer Check the ole-ocx-activex group. There are also several examples in the help documentation. -- Paul Horan[TeamSybase] ...

How to add Hyperlink to form through designer
Hi, I've form "a", "b", "c" under different categories(i.g. accounts, groups etc.) in PRD. I want to add a hyperlink to form "a", when user'll click on it, based on a boolean flag, will forward the user to either "b" or "c". Can anybody tell me, whether, a) there is any form field as "hyperlink"? and, b) how can I point it to another form (i.e. b or c)? We can do this in HTML, <a href="b.*">click me</a> Is there any attribute like "href" where i can mention the destin...

not able to add COM components
I am using visual web developer 2005 editioni add COM components to the existing tool box under the Standard tab by TOOLS -> CHOOSE TOOLBOX ITEMS.i selected items from the COM Components tab.now , only if i right click anywhere in the tool box and select show all the items those i have selected appears gray and i not able to select them or include them in my pages.please help me  Did you register the COM component? There are 2 ways. One use regsvr32 componentname.dll or open the component services and drag and drop it there.CheersAlMy BlogMapStats.NETPlease click on 'Mark ...

Very limited undo in Delphi form designer
Are there any plans to add "real" undo capabilities to Form designer? Each time I mess things up in Form designer I need to close the entire form without saving and reload it. Farshad Mohajeri wrote: > Are there any plans to add "real" undo capabilities to Form > designer? Each time I mess things up in Form designer I need to > close the entire form without saving and reload it. Ain't that the truth! I second this request. "Farshad Mohajeri" <farshadAT@fmsoft.net> wrote in message news:208265@forums.codegear.com... > Are ...

Add triangles to component during design time
Hi. I want to add two triangles to my control that the programmer can move during design time, but which are not visible to the end-user. I tried the following, which doesn't work. The triangles are not visible. TMyControl = class(TCustomControl) private AlignHandle: Array[0..1] of TGraphicControl; protected procedure Paint; override; public constructor Create(AOwner: TComponent); override; end; TMyTriangle = class(TGraphicControl) protected procedure Paint; override; end; implementation procedure TMyTriangle.Paint; begin inherited; Widt...

Delphi XE design components icons
I have installed Delphi XE. Then I successfully installed "ZeosLib" components. All is working. However the icons/bitmaps of my "ZeosLib" components then disappeared from the IDE. Where are these loaded from? If I knew I could get them back. Kind Regards, Robert. Robert Gilland wrote: > I have installed Delphi XE. > > Then I successfully installed "ZeosLib" components. > All is working. > > However the icons/bitmaps of my "ZeosLib" components then disappeared > from the IDE. Where are these loaded fro...

Value add to both Delphi Win32 and Prism
Now that a deal has been done with RemObjects why not push further and buy Developer Express. All the DevX products could be added to the native and Dot.net SKUs to add value and make both offerings more attractive. David Champion wrote: > Now that a deal has been done with RemObjects why not push further > and buy Developer Express. All the DevX products could be added to > the native and Dot.net SKUs to add value and make both offerings more > attractive. Um, no. Thanks. I like DevEx right where they are - successful, innovative, and most importantly, independent. ...

Web resources about - How to add COM component in Delphi Prism design form? - embarcadero.delphiprism.lang

Component - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

GQ Loses Another Critical Style Component
GQ Loses Another Critical Style Component

Spent on specs: are smartphone component wars overrated?
... made, or at least a few dozen? Ironically, many of the games that are recommended tend to be those that don't require blazing hardware components ...

Teardown of iPad Pro reveals revamped component layout
... Apple device teardown on the iPad Pro on Wednesday, revealing a reworked internal design dominated by massive batteries and bespoke audio components. ...

Corvette Stingray gets optional Z06 components
Filed under: Chevrolet , Coupe , Performance Chevrolet announces a series of upgrades available for the Corvette Stingray derived from the equipment ...

IDG Contributor Network: Four critical patches for November Patch Tuesday update core Windows and Office ...
Microsoft's November Patch Tuesday brings us four critical updates and eight important patches that attempt to resolve 54 reported vulnerabilities ...

DeBoer makes no excuses for components Sharks are missing
... 58° Navigation Home Giants A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch DeBoer makes no excuses for components ...

Immigration Law Enforcement: A Vital Component Of National Security And Counterterrorism
While the administration claims that these refugees are being vetted, there is no way to actually screen these people

Pneumatic component maker Taiwan Chelic debuts on TSE
Shares of pneumatic automation component maker Taiwan Chelic started trading on the Taiwan Stock Exchange (TSE) on October 27 with an initial ...

Teflon Component Tied to Kids' Weight Gain
PFOA, a main component of Teflon, has been linked to increased body fat and faster weight gain in children.

Resources last updated: 11/28/2015 2:09:09 PM