Solved

*.OCX File

Posted on 2000-02-15
23
2,469 Views
Last Modified: 2008-03-10
i) What is *.OCX file?
(e.g. MSCOMCT2.OCX, MSCOMCTL.OCX, etc.)

ii) Whenever I try to copy my VB source directory to others PC, loading of that source will failed. How to overcome this?

TQ;
pkimk
0
Comment
Question by:pkimk
  • 12
  • 10
23 Comments
 
LVL 9

Accepted Solution

by:
Ruchi earned 1000 total points
Comment Utility
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
Sorry... this is the correct one.

Use the REGSVR32 utility to register 32bit components. REGSVR.EXE is the 16bit equivalent. The /s switch will stop the notification dialog from appearing. The /u switch unregisters the component. For example,
Regsvr32 /u /s c:\winnt\system32\mycomponent.ocx

or,

http://support.microsoft.com/support/KB/ARTICLES/Q173/0/91.asp

or,

http://support.microsoft.com/support/KB/ARTICLES/Q147/6/70.asp
0
 

Author Comment

by:pkimk
Comment Utility
To be clear, I should give more details on my question.

I'm still in coding status, using VB6.0 on Win95. When I copy my source code to others PC, upon opening the source code at that PC, VB failed to load some of the *.ocx file. Some component of form will lost (e.g. StatusBar).

What can I do? so that I can copy my source code from one PC to others and continue my coding, or vv.

TQ;
0
 

Expert Comment

by:TheFly
Comment Utility
pkimk,

the MSCOMCT2.OCX and MSCOMCTL.OCX contain controls like tabstrip, toolbar, statusbar etc..

it would appear that your 2nd pc doesnt have these files or if it does these files they are not registered.

as ruchi mentioned you will need to register these controls using regsvr32.exe.

hope this clears things up a little.
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
All you need to do is to register these controls -- regsvr32.exe. Also, you need to read the MS KB article.
Hope this helps.
0
 

Author Comment

by:pkimk
Comment Utility
Adjusted points to 150
0
 

Author Comment

by:pkimk
Comment Utility
I still not help. I read ~MS/KB/ARTICLES/Q173/0/91.asp and tried accordingly, but some error.

spoon feed me.
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
What are some error? What did it say exactly?

Did you try to do this?

Go to Start, Run and type:
RegSvr32 NAME.OCX

Replace NAME.OXC with the file name of the ocx file, such as "c:\windows\system\mscomct2.ocx"



FILE: VB6Cli.exe Fixes License Problems with Visual Basic 6.0
http://support.microsoft.com/support/kb/articles/Q194/7/51.ASP?LNG=ENG&SA=MSDN&FR=1



PRB: "License Information for This Component Not Found" Error
http://support.microsoft.com/support/kb/articles/Q177/7/99.ASP?LNG=ENG&SA=ALLKB
0
 

Author Comment

by:pkimk
Comment Utility
I go to Start, Run and type:
RegSvr32.exe c:\windows\system\mscomct2.ocx

System prompt:
DllRegisterServer in c:\windows\system\mscomct2.ocx succeeded.

When I open project, VB prompt me:
c:\<mySourceCodePath>\MSCOMCT2.OCX could not be loaded--Continue Loading Project?

once I continue loading the project, some form log file created, said :
Line 15: Class ComctlLib.StatusBar of control StatusBar1 was not a loaded control class.
The Status Bar component of my file was lost!

Please advise.
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
Pkimk:
Okay. Try to do what the web site says ... http://support.microsoft.com/support/kb/articles/Q138/5/27.asp

Did you read the MS article of "PRB: "License Information for This Component Not Found" Error?" It should fix your problem.
0
 

Author Comment

by:pkimk
Comment Utility
I did whatever according to the support articles.

I also got the message "Enterprise Design Licenses Have Been Installed Successfully" upon install VBCli.exe

But, still the same error!
MSCOMCT2.OCX could not be loaded.
0
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.

 

Author Comment

by:pkimk
Comment Utility
Adjusted points to 1000
0
 

Author Comment

by:pkimk
Comment Utility
Urgent!
Anyone, please help.
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
this must very important to you..

please visit to
http://support.microsoft.com/support/kb/articles/Q190/9/52.ASP?

for upgrading.
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
http://support.microsoft.com/support/kb/articles/Q194/4/12.ASP?

it is for upgrading, too.


Comments from the experts---
"Compare the version numbers of all used DLL's. You can do this in the explorer in the property sheet of the DLL. Some DLL's need to be updated. Making an installation application like suggested about is the best thing to do.
Oh here is another hint:
Download Filemon or NTFilemon from www.sysinternals.com Start Filemon and now run the application that gives the error. Filemon will show a trace. In this trace it will also show you which file failed to open. That's the one you are missing. Filemon can be redirected in a dos box using filemon > output.txt
Copy the missing files and register them if needed with regsvr32.exe in case of DLL/OCX files "



"You can do the following first unregister the .ocx using the unregserver.exe. Then register the .ocx using regserver.If this does not work then try the following using the setup uninstall all the components and reinstall the components. this should work.


"Try to install the comcl32.ocx again, if that doesn't work reinstall Visual Basic, if that doesn't work format C:
I've had the same problem and I had to format C: "


"Check the language in the Riched32.dll properties, if the language is different from the one of Richtx32.ocx that may be the problem."


Hope this helps you.....
0
 

Author Comment

by:pkimk
Comment Utility
I did tried out unregister/register library, uninstall/reinstall VB6 and format C: before you suggested it. It doesn't work.

OK, you've solved part of my problem now. I able to get back my component of mscomctl.ocx (StatusBar, etc). What I did is take the easy way in ~/articles/Q190/9/52.ASP?, download ProjUpgd from internet and run it.

Now, I still facing problem with mscomct2.ocx
A log file created for my form :
Line 237: Class MSComCtl2.DTPicker of control dsDate was not a loaded control class.
The DTPicker component was lost.

Please advise.
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
You can find a folder names Controls in the VB's CD, and there has a reg file,
double click it.

In the readme file of \tools\controls I found the way to register the time    licenses for the controls.

From the expert's comments

"On your VB cd there is a registry file named vbctrls.reg in the              VB6.0\tools\Controls directory. Insert this reg file in the registry by double clicking. That should solve the problem."
0
 

Author Comment

by:pkimk
Comment Utility
File vbctrls.reg not found in my CD. Any other way to solve it?
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
I don't have CD with me now, but it is in other room. I will get it tomorrow, and I will tell you where to find the registry file on my CD.

"PRB: "Error loading from file" Error Message When Running .Exe"
http://support.microsoft.com/support/kb/articles/Q138/5/27.asp?

"PRB: Cannot Add Windows Common Controls or Common Dialog Control to Project "
http://support.microsoft.com/support/kb/articles/Q221/9/90.ASP?

"PRB: Visual Basic Program Does Not Run on Other Computers "
http://support.microsoft.com/support/kb/articles/Q152/6/09.asp?
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
try to run one more time with your mscomct2.ocx
http://support.microsoft.com/support/kb/articles/Q190/9/52.ASP?

0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
I could find a file on my CD -- Professional 6.0

ANyways, read this following article --

http://support.microsoft.com/support/kb/articles/Q195/3/53.ASP

This tells you where to find on your CD -- Enterprise.




make a Installation program for your app using Application Setup Wizard
(you should have it with your VB). It will do everything your program needs to work on machine without VB.
0
 

Author Comment

by:pkimk
Comment Utility
You've suggest too many reading for me.

After I convert the project file using ProjUpgd.
Register the mscomct2.ocx using RegSvr32.exe again.
All problem solved.

Cheers;
pkimk
0
 
LVL 9

Expert Comment

by:Ruchi
Comment Utility
Pkimk: I'm glad that all of your problems are solved! And, I'm glad that I could be of any help to you.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

763 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

7 Experts available now in Live!

Get 1:1 Help Now