Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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 November 10th, 2006, 12:47 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default Including an .ocx

Hi All,

I've created a .exe for my VB6 application. I'm using the gif.ocx in the application. When I copied the .exe to another computer to test it out, I got an error saying the gif.ocx was missing.

Help!

Thanks in advance.

Kevin

dartcoach
__________________
dartcoach
 
Old November 10th, 2006, 12:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. you have to deploy the ocx as well ;)

just save the ocx in the same folder as the application and register it using regsvr32

HTH

Gonzalo
 
Old November 10th, 2006, 01:02 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks for the quick reply.
I've never done that.
Storing the .ocx, no problem.
How do I register it?

Kevin

dartcoach
 
Old November 10th, 2006, 02:05 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are doing this for yourself (you have access to the computer where you will install the ocx) the you use the command line or "run" dialog to register an ocx. HOWEVER, there are often support files that might be needed as well, and therefore simply registering the ocx might not be enough.

Assuming you only need to register the ocx, that is done with at the command line like this:

regsvr32 "C:\Path Here\gif.dll"

The more robust way to do this is to create a Setup program, with the package and deployment wizard, or with a thrid party tool such as Wise or Install Shield.

Woody Z http://www.learntoprogramnow.com
 
Old November 10th, 2006, 02:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

[Edited: Sorry, didn't saw the other reply]

use regsvr32, look for it in the system folder of the target machine.

usage like regsvr32 /i and the path of the ocx to register (full path)
to uninstall use regsvr32 /u [fullpath]

HTH

Gonzalo
 
Old November 10th, 2006, 02:20 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

thanks guys!

dartcoach
 
Old November 10th, 2006, 07:19 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

I've packaged my project. I want to email it to a friend. Since this is the first time I've used the package wizard, I don't know which file to send.

Any help?

Kevin

dartcoach
 
Old November 13th, 2006, 09:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

if you packaged it with P&D wizard you addressed a dir with the destination of the installer.. you have to send all the files in there...

HTH

Gonzalo
 
Old November 13th, 2006, 12:55 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks, all. Got it to work!

Kevin

dartcoach
 
Old November 13th, 2006, 01:37 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent

Woody Z http://www.learntoprogramnow.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Including Other Project notrosh Visual C++ 1 April 23rd, 2007 12:09 AM
Including activex ashishprem Beginning VB 6 4 January 23rd, 2007 08:07 AM
Including a text file mahulda ASP.NET 1.0 and 1.1 Basics 2 June 27th, 2004 10:21 AM
Including same files in different directories jeremy108 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 August 8th, 2003 01:37 PM
MSFLXGRD.OCX and MSDATGRD.OCX Clive Astley Access 1 July 25th, 2003 08:47 AM





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