Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get ocx filename for a given ActiveX control 1

Status
Not open for further replies.

StewartUK

Programmer
Feb 19, 2001
860
GB
How can I find out what ocx file an ActiveX control resides in?

I am using the control MSCAL.Calendar.7 - that's what it says in the OleClass property in the property sheet.

I'm finding that it isn't installing itself on users computers when I run the installation. I thought if I knew what ocx this control is in, I could manually register it.

Thanks,

Stewart
 
Stewart

This is not going to answer your specific question, but will assist with registering.

Go to a pc that has MSCAL.Calendar.7 installed properly

Look in the registry, probably under local machine and find the MSCAL.Calendar.7 setting.

Using faq184-4674 Read the Windows Registry and you can deteremine if you need to register it.

Therefore, this will help you determine if you need to register it, but does not assist with the name of the file. However, I thought you might find the info helpful.



Jim Osieczonek
Delta Business Group, LLC
 
For the OCX's that come with VFP, you can get the file names and the help files that match, by going to the "ActiveX Controls Overview" help topic.

Rick
 
Rick/Jimoo,

This is confusing!

The ActiveX Controls Overview help page says that the DateTimePicker and the Monthview controls are in MSCOMCTL2.ocx.

However when I search C: I find MSCOMCTL.ocx & mscomct2.ocx in the WINNT\System32 folder but MSCOMCL2.ocx doesn't exist!

I found both these OCXs on the machine of a user where, when I try to instantiate the ActiveX control, I get an error that it is not registered.

When I looked in my computer's registry, I found MSCAL.Calendar.7 in HKEY_CLASSES_ROOT & HKEY_LOCAL_MACHINE, but it was not in the registry of the user's computer.

So it looks like I need to register the file MSCOMCTL.ocx on the user's computer. Jimoo - I see you've got the line
Code:
RUN /n regsvr32 myDLL.DLL /S
in your FAQ. That looks like the syntax for running it from VFP command line. If I used the Run option from the Start menu, would I just have the line
Code:
regsvr32 MSCOMCTL.ocx
?

I use the InstallShield Express installation program that comes with VFP. Are you able to suggest what I might have missed for the ocx not to get registered? Do I need to specify it separately from the Microsoft Windows Common Controls modules in the Objects & Merge Modules section?

Thanks for your help,

Stewart
 
Try limiting your seach to:

mscomc*.* to see what comes up. Maybe the spelling is very close.



To register from the Windows Run Dialog box:
regsvr32 myDLL.DLL /S

The /s is silent mode - it does not provide you with a dialog box. You can try it without it also to see what I mean.

You will replace the mydll.dll with the control name once you have determined it.



Jim Osieczonek
Delta Business Group, LLC
 
If you have the activex control on a form or in a class.

Open up the form or class as a table (use myform.scx or myclass.vcx).

set filter to !empty(ole2).


This will narrow the display down to only activex controls. Look in the ole2 field it will give you the filename and location.
 
Thanks Fluteplr!

Last night I found this out the hard way - through searching the registry - dullsville!

I am of course now embarrased as I realise that the control I am using does not come with VFP :~/, it's in an ocx called mscal.ocx.

Thanks for everyone's help - great as always :)

Stewart
 
Final report:

I copied mscal.ocx from my local drive to the local drive on the user's computer, into folder winnt\system32.

From the Windows Run Dialog box I executed the line regsvr32 mscal.ocx

And it all works now :-D

Thanks again,

Stewart
 
See the topic The function in there called "IsActiveXReg" shows where to look in the registry for the OCX (or DLL!) for a particular control.

There are also routines for programmatically registering or unregistering the controls, too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top