CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2003
    Posts
    14

    Question "Include" other files into exe...

    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?
    VB6 SP5 ACCESS MSSQL mySQL CR

  2. #2
    Join Date
    Jan 2003
    Location
    Albany, NY
    Posts
    82
    .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.
    Your code can only be as good as your algorithm.

  3. #3
    Join Date
    Jan 2003
    Posts
    14
    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...
    VB6 SP5 ACCESS MSSQL mySQL CR

  4. #4
    Join Date
    Jan 2003
    Location
    Albany, NY
    Posts
    82
    You can't do that in VB.
    Your code can only be as good as your algorithm.

  5. #5
    Join Date
    Jun 2002
    Posts
    126
    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.

  6. #6
    Join Date
    Jan 2003
    Location
    Albany, NY
    Posts
    82
    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?
    Your code can only be as good as your algorithm.

  7. #7
    Join Date
    Jun 2002
    Posts
    126
    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)

  8. #8
    Join Date
    Jan 2003
    Posts
    14

    Cool Ok

    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.
    Last edited by stickan; February 25th, 2003 at 09:18 AM.
    VB6 SP5 ACCESS MSSQL mySQL CR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured