Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Nov 2010
    Posts
    74
    Points
    138
         User Info     Contact     Gamer ID
    Join Date
    Nov 2010
    Posts
    74
    Points
    138

    Default VB.NET Using a Binary File as a resource

    This was something I used in order to try and keep my programs down to 1 file. Instead of including a seperate file that handled the updating, I simply embedded it into the main program. To do this all I did was make it a resource and when I needed to use it I would write it out to the root directory that the program was in.

    To add a file as a resource, right click your project and click properties.


    Click on the Resources tab. On the top click on strings and select files. Drag and drop the file you want to include as the resource into this window.


    Click save or save all.

    Now when you decide you need to use that file you can write it out to a directory then run it.

    Code:
          
    IO.File.WriteAllBytes("./" & "Updater.exe", My.Resources.Updater)
    Process.Start("Updater.exe")

    0 Not allowed! Not allowed!

  2. #2
    Member
    Join Date
    Feb 2014
    Posts
    111
    Points
    398
         User Info     Contact     Gamer ID
    Join Date
    Feb 2014
    Posts
    111
    Points
    398

    Contact info:

    Youtube Channel: http://www.youtube.com/

    Default

    Its helpfull for me

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 11:49 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.