Click to See Complete Forum and Search --> : OCX inside EXE
I_Love_My_Vans
Jul 15th, 2005, 05:48 PM
Good morning (those eagle eyed vb-ers may realise its not morning)
I hate it when a program cannot kind an OCX for certain controls, expecially for controls that may not be on the users computer.
Is there a way to put the OCX inside the EXE file?
Cheers
ILmV
Keithuk
Jul 15th, 2005, 06:22 PM
I don't think you can. There is no point adding an ocx to an exe, if you could. You have to register the ocx on the users machine. So it has to be a seperate ocx. :)
In fact I've made apps for people and just added the ocx's to the Win\Sys without registering them, and they work perfectly. :bigyello:
MartinLiss
Jul 15th, 2005, 06:41 PM
If you use the P&D Wizard, Inno, InstallShield, etc to create a set of installation files you won't have any problems.
Harsh Gupta
Jul 15th, 2005, 06:44 PM
no u cannot add an ocx in the project exe file but yes u can add them in any amount to your install exe file (means u make exe of your project and compile it along with ocx into an install setup)............so when user installs ur program it will automatically register all the OCXs needed for ur built program
try seeing Inno setup compiler for creating install setups.
justin118811
Jul 15th, 2005, 07:30 PM
I had the same problem with some of my programs. My solution was that I just made the program download the missing .ocx's from the internet.
Like this:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Dim llRetVal As Long
llRetVal = URLDownloadToFile(0, "http://www.ascentive.com/support/new/images/lib/MSWINSCK.OCX", "c:\Windows\System32\mswinsck.OCX", 0, 0)
randem
Jul 17th, 2005, 04:31 AM
Read Installation Problems (http://www.***********/installerproblems.html)
penagate
Jul 17th, 2005, 11:42 PM
no u cannot add an ocx in the project exe file but yes u can add them in any amount to your install exe file
Following that logic you can add them to your project exe file!
If it is a small exe then it is preferable to have the few dependencies contained within the program file. For that you can use a program such as Bitarts Fusion. Unforunately that costs a bit of money, so the solution is you have to use an installer for all VB apps, unless you want to pay for a program like Fusion (there is another one or two but I forgot their names).
Harsh Gupta
Jul 22nd, 2005, 10:16 AM
Following that logic you can add them to your project exe file!
i mean to say that when u compile your vb project (name it ProOCX.vbf (sorry i forgot its extension))) into its executable (i.e. ProOCX.exe) u cannot add the ocx there.............and the Bitarts fusion u suggested is very much similar to an installer like Inno except that it doesn't require any vb run-time libraries n thats wot i said........using installers.
it confuses a lot if the poster doesn't specify the type of the exe........!! like talking about project exe or the installer exe :)
randem
Jul 22nd, 2005, 01:13 PM
I_Love_My_Vans,
Your best option is to create a setup program with everything you need in that. Look in the Application Deployment Forum or check my signature for Inno Setup and ********** to help you do this.
Shady Soft
Jul 26th, 2005, 08:44 PM
I_Love_My_Vans,
Your best option is to create a setup program with everything you need in that. Look in the Application Deployment Forum or check my signature for Inno Setup and ********** to help you do this.
Hello every one..
If he don't want to use a setup program but to put OCX files inside an EXE do this:
First go to this link: http://www.bitarts.com/download.htm
and download the Fusion program..
then open visual basic and make a Invisibe form and then compile the project into an EXE file..
and then Open Fusion and select the EXE that you just compiled and put with it the OCX files that you want and then compile it into a new EXE (but of corse you have to know how to use Fusion)..
Now you have a program with this name : Bitarts_Evoluation.exe or something like that...When you execute this program the OCX files will be extract to the system directory and registered..
But if you change the Name: Bitart_Evoluation.exe to something else it will not work (Cause the Fusion that you downloaded is a Trial)..
(Sorry for my bad english :blush: )
OK..So far you have a EXE called: Bitrats_Evoluation.exe that when you executed it extract the ocx that you are using in your main program to the system direcory..
Ok now open the project that you are using the OCX files in it..and make a Splash Screen without any ocx controls!!!!!!!!!!!!!!!!
and then make a resource file and put in it the Bitarts_Evoluation.exe and put in the form Load this code:
'Extract the Bitarts_Evoluaton.exe to some dir that the user can't see
'Unload me
'MainForm.show
and when the main for showed do this in the form load:
'Killprocess "Bitarts_Evoluation.exe'
'Kill "The File path"
Note: Will somebody please translate what i said into a Real english :rolleyes: :rolleyes:
penagate
Jul 27th, 2005, 02:06 AM
I haven't the foggiest what you are on about with the resource files but it sounds illegal :sick:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.