Jump to content

VB.NET 2005, resources question


Recommended Posts

Hi,

In VB.NET 2005 you have resources with your form. For example a .png file is saved there you use in your form, and it will be integrated in the form.

You can access that file by running this code:

My.Resources.TestFile.Save("C:\TestFile.png")

In this case, TestFile is the one in the resources folder (which will be integrated in the .exe), and TestFile.png is the one that will be saved under the "C:\" directory.

Now my question is, is it possible to do the same with a .zip file ?

This is what i thought that should work:

My.Resources.TestFile.Save("C:\TestFile.ZIP")

With TestFile as the .zip in the resources folder, and TestFile.ZIP should be saved under the "C:\" directory.

But you can't use the ".Save" property for .zip ,etc. files!

Anyone knows a workaround or something with this?

I want to have a .zip file integrated in my form, which I can than copy out of the .exe to another folder which is given up between the "(...)" ;)

thx in advance!

Edited by Jeroeneke
Link to comment
Share on other sites


Try embedding the zip file as a resource. Should be able to search for how using MSDN, cant remember myself. You will most probably be able to manipulate it from there in some way *scratch* or you could just package it with the form... *shrug* there are a few ways AROUND it but go figure for the actual solution!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...