Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 15th, 2004, 03:25 PM
Authorized User
 
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I use an ActiveX Control?

I am working with a reference library that includes an ActiveX control. Do I need to reference another library (Microsoft Shell Controls and Automation, perhaps?) in order to get that control to work? And, if so, how do I work that into my code?

I am working in the VB editor under Excel 2003. The control I want shows up in the Object Browser, but no matter how I include that control in my procedure - and by now I have played with all different permutations of DIM, SET, DIM as NEW, SET as NEW that I can think of - nothing happens.

(Fwiw, I am trying to program with the Microsoft Office Document Imaging 11.0 Library. The Microsoft Document Imaging Control, MiDocView, is the item I cannot for the life of me get to fire up.)


ArtDecade
__________________
ArtDecade
 
Old September 16th, 2004, 02:04 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If using Visual Studio
    Have you created a project reference to the ActiveX/COM object?
Else
    Have you created a runtime callable wrapper using the tlbimp utility?
 
Old September 16th, 2004, 07:46 PM
Authorized User
 
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using the VBA that is attached to MSFT Excel 2003.

I am not 100% sure what you mean by creating a "project reference". The ActiveX object is part of the MODI library, which I have checked off under Tools/References. The ActiveX object then shows up within the Object Browser.

As for creating a "runtime callable wrapper"........ uh, being a beginner, I have not the slightest idea what any of those three words mean.

ArtDecade
 
Old September 16th, 2004, 07:49 PM
Authorized User
 
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am working in the VBA attachment in Excel 2003. I am not entirely sure what you mean by creating a program reference to the ActiveX object. Howerer, the ActiveX object is contained within the MODI library, and I have that library checked off within Tools/References. Further, all of the MODI objects - including the ActiveX object - show up within the Object Browser.

As for creating a "runtime callable wrapper"..... I am a beginner and have virtually no idea what that means :(

ArtDecade
 
Old September 17th, 2004, 09:12 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What development environment are you using?


A runtime callable wrapper or RCW is a .NET assembly that contains "stub" classes that expose all the public classes and methods of a COM component. There is a tool that is used to generate this assembly. Then your .NET project reference that assembly.
 
Old September 18th, 2004, 03:23 AM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wuzhj Send a message via AIM to wuzhj Send a message via MSN to wuzhj Send a message via Yahoo to wuzhj
Default

Hi Mr.planoie:
   I'm a green hand in Visual C++, I hope I will get a lot of advice from you about how to do first when I want to make a great improvment in Visual C++.
   Thanks in advance!
      wuzhjun

wuzhjun





Similar Threads
Thread Thread Starter Forum Replies Last Post
Charting ActiveX Control seananderson VB.NET 2002/2003 Basics 0 August 13th, 2007 04:46 AM
ActiveX control for IE6 crmpicco VB How-To 3 January 17th, 2005 12:15 PM
PropertyList activex control coder_gig79 VB Components 3 October 6th, 2004 10:32 PM
ActiveX Control not displaying rajupusapati VS.NET 2002/2003 0 February 19th, 2004 12:10 PM
Could not instantiate ActiveX control because the karthey VS.NET 2002/2003 0 July 1st, 2003 05:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.