JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: Is It Possible Archived to Disk
If the OCX's are standard windows ones, and the VB Runtimes (Win98 and NT with SP4-5 already have I believe), the program should run without problems anyway.
If you mean custom controls, if they're in the program's folder, normally it will work without them needing to be installed (although not always).
However you can always create a "loader" program that will install the controls, then run the executable (from the loader program).
If you do the last option the following are handy:
For ActiveX EXE
filename.exe /regserver
filename.exe /unregserver
For OCX/DLL:
'---START CODE ----
Declare Function DllRegisterServer Lib "NAME_OF_FILE.OCX/DLL" () As Long
Declare Function DllUnregisterServer Lib "NAME_OF_FILE.OCX/DLL" () As Long
Const ERROR_SUCCESS = &H0
' To register your OCX use this function:
If DllRegisterServer = ERROR_SUCCESS Then
MsgBox "Registration Successful"
Else
MsgBox "Registration Unsuccessful"
End If
' To unregister your OCX use this function:
If DllUnregisterServer = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If
'---END CODE---
|