954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to use Windowless ActiveX.dll in my project

Hello,
I am trying to use a ActiveX component (written by someone else) in my Visual Basic 2005 project. I am new to VB2005, so please bear with me.

I added the COM reference to the ActiveX.dll class to the project.
I choose the Toolbox Items from COM Components Tab and added the ActiveX component to the General Toolbox.
I am able to place this ActiveX component in the Main.vb form, I can see the object's properties but I encounter a problem when I attempt to run (F5) the project. I get the following error:

at System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb(Int32 iVerb, IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr hwndParent, COMRECT lprcPosRect)
at System.Windows.Forms.AxHost.DoVerb(Int32 verb)
at System.Windows.Forms.AxHost.InPlaceActivate()
Unable to get window handle.. Windowless ActiveX are not supported.

What am I doing wrong? Your help is greatly appreciated.

Thank you.

cyman73
Newbie Poster
11 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

The last line tells you, you can't. Is it windowless or is vb not seeing the window?

Unable to get window handle.. Windowless ActiveX are not supported.

I don't think there is anyway to fake it.

waynespangler
Posting Pro in Training
461 posts since Dec 2002
Reputation Points: 84
Solved Threads: 58
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You