I'm sure I read somewhere on codeguru about how to include other files into the .exe (Like .ocx, .dll). Do anyone here know about it or have a link where I can read about it?
Printable View
I'm sure I read somewhere on codeguru about how to include other files into the .exe (Like .ocx, .dll). Do anyone here know about it or have a link where I can read about it?
.Dll- menu Project>References
.Ocx- menu project>Components
For the above to apear they must be registered on your computer. If you created them in VB this is done automaticaly, but if you downloaded them or copied them you'll have to run regsvr32 to register them on your computer.
Hmm... I mean that when I made the exe I want to include them into the exe, so I don't need a Setup... Sounds strange maybee... But I have read about it...
You can't do that in VB.
Yes you can do it in VB. in Tools menu you have Resource editor (if not, then add it from the Add-ins menu). There add custom resource to you program. Then use LoadResData to get that data.
How do you use LoadResData to load a DLL as I understand it this function only works with
1 Cursor resource
2 Bitmap resource
3 Icon resource
4 Menu resource
5 Dialog box
6 String resource
7 Font directory resource
8 Font resource
9 Accelerator table
10 User-defined resource
12 Group cursor
14 Group icon
How do you use it to load a DLL?
In 10 User-defined resource you can store any data you like, including files. as far as I understand stickan didn't want to load it, just keep it with the exe.
To load a dll, you save that resource as a dll in runtime and just use it (depending on the type of dll you may also have to register or Load it with LoadLibrary API)
I solved the problem. Maybee I was a little indistinct... What I wanted to do was to include my own made Active X:s. Then I just need to add the user control module to the standard exe project.