Solved

Working with Custom ActiveX

Posted on 2002-03-12
2
174 Views
Last Modified: 2010-05-02
facts:
1. I created an ActiveX Control. and compiled it. Automatically, VB registered the control.  The project is in c:\MyActiveX
2. I used that control in my other project (Payroll System).  So, now its referencing the ocx file from the folder c:\MyActiveX.

my question:
What if I want to move the folder c:\MyActiveX to drive D:?  How can I open the Payroll project without having errors... Coz right now, the ActiveX controls in my payroll project becomes PictureBoxes.  How to I tell my Payroll project that the folder has been moved to drive D:?
0
Comment
Question by:killer5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
segan earned 50 total points
ID: 6859541
Hi,

Whenever you open the project which uses that OCX, in design mode, VB will try to locate OCX in the same folder where it was registered.

To get pass this problem, open the .frm file in notepad and modify the path, which would something like,

Object = "{06799C28-B918-4A68-9614-7EF1ED27C4D1}#1.0#0"; "C:\MyOCX.ocx"

And better solution to this kind of problems is,

Allways keep your controls as UserControl Modules in the same project till it completed.

Selva.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6861231
Grade changed.

killer5,

This response was complete, and even went beyond your request with some valuable advice.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question