PDA

Click to See Complete Forum and Search --> : Error in loading OCX


Girl
Aug 31st, 1999, 02:35 PM
Hi, I face a problem after copying my VB source codes to another PC to run. The MCI32.OCX is not loaded successfully on the destination PC, some msgs like "You Don't have license info.......in registry.....
and somewhat like........you can't use this OCX in design time...." although I'd reinstalled the OCX, the problem is still there, what can I do ? Please. I'd upgraded the original VB 5 to VB 5 with Service Pack 3.

In fact, I find VB very disgusting as I copy the source codes from 1 to another PC, sometimes there's a confusing error msg like File Not Found, the XXX is not loaded......." but I think all the files are completely copied, and the related OCXs are properly installed into the windows\system\ directory. In brief, what's the cause of this kind of error msg ?

Aug 31st, 1999, 07:52 PM
I doubt I can answer all of those wuestions but I find difficult to simple transfer the control files from one PC to another for a number of reasons...

You may have already tried each of these tips but 'll try to help anyways...

1: Be sure that the PC#2 ahas the same exact install (SP3) version as PC#1...

2: Be sure that the OCX is not already registered in PC#2 before the Service was updated... If it is you'll need to unregister it and then register it again and be sure you only have one copy of the file in the system directory or app path...

3: I don't think that the OCX is a third party but, if it is, you'll need to use the install routine to deliver the design OCX and .lic file that is required to manipulate the properties of that file... I don't think this your prob...

4: Put this code into a new project and add a textbox and a couple of command buttons
and unregister the .ocx manually and then reregister it again...

'****************************************
Public Sub RegOCX(sFileName As String, Optional UnReg As Boolean = False)
' Declare variable.
Dim sCommand As String
If UnReg = True Then
sCommand = "Regsvr32 -u " & sFileName
Else
sCommand = "Regsvr32 " & sFileName
End If
Call Shell(sCommand, vbNormalFocus)
End Sub

'Just input that name of the .ocx into the Text1.Text
Private Sub cmdreg_Click()
' Register the ocx.
Call RegOCX(Text1.Text, False)
End Sub

Private Sub cmdunreg_Click()
' Unregister the ocx.
Call RegOCX(Text1.Text, True)
End Sub

'***************************8


Another option would be to upgrade to version 6.0

(you prob didn't want to hear that... hehe)


anyways,,,
Hope this helps ...

Marc

------------------


[This message has been edited by mrmarshall (edited 09-01-1999).]