Solved

Working with Custom ActiveX

Posted on 2002-03-12
2
170 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now