Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 15th, 2004, 03:25 PM
Authorized User
 
Join Date: Jul 2004
Location: New Providence, NJ, USA.
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
Reply With Quote
  #2 (permalink)  
Old September 16th, 2004, 02:04 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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?
Reply With Quote
  #3 (permalink)  
Old September 16th, 2004, 07:46 PM
Authorized User
 
Join Date: Jul 2004
Location: New Providence, NJ, USA.
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
Reply With Quote
  #4 (permalink)  
Old September 16th, 2004, 07:49 PM
Authorized User
 
Join Date: Jul 2004
Location: New Providence, NJ, USA.
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
Reply With Quote
  #5 (permalink)  
Old September 17th, 2004, 09:12 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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.
Reply With Quote
  #6 (permalink)  
Old September 18th, 2004, 03:23 AM
Registered User
 
Join Date: Sep 2004
Location: taiyuan, shanxi, China.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:42 PM.


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