|
-
Jun 16th, 2010, 10:49 AM
#1
Thread Starter
Junior Member
Moving a folder from the resources.. possible?
Title says it all.. I have a folder in the resources called 'files', which contains sub folders which I want to move into another directory.. I searched but found nothing, any ideas?
-
Jun 16th, 2010, 07:01 PM
#2
Re: Moving a folder from the resources.. possible?
I think that you have misunderstood what resources are. When you add resources to your project the originals will appear in a folder in the Solution Explorer because they are source files. When you build your project though, just like your code files, those resources are compiled into the final EXE. That's the whole point of resources: they are part of your executable file, not separate files on their own.
-
Jun 17th, 2010, 01:12 PM
#3
Thread Starter
Junior Member
Re: Moving a folder from the resources.. possible?
Hmm, Alright.. only started VB.net a few days ago, so still learning these things. Is there any other way to put these files into the .EXE? I don't really want to be adding other folders to my download.
-
Jun 17th, 2010, 05:49 PM
#4
Re: Moving a folder from the resources.. possible?
Again, that's the whole point of resources. The files ARE part of your EXE. There are no extra folders.
Ideally, in VB 2005 and later, you should add your resources via the Resources page of the project properties rather than via the Solution Explorer. You can then access them in code via My.Resources.
Regardless of how you add them, there are no extra folders and there are no extra files. When you build your project, the resources are compiled into the EXE file.
-
Jun 18th, 2010, 01:14 PM
#5
Thread Starter
Junior Member
Re: Moving a folder from the resources.. possible?
Alright, it works when I use the resources page.. just wasn't working when I was dragging the files into the resources tab on the right column, thanks!
-
Jun 20th, 2010, 03:59 PM
#6
Thread Starter
Junior Member
Re: Moving a folder from the resources.. possible?
Sorry for double post, but just to clarify that you cannot use folders in resources? If not, is there any other approach I could take in order to get all my files (100+) in the single EXE? (I wanted them in the folder because it would be easier moving a directory than a single file)
-
Jun 20th, 2010, 06:17 PM
#7
Re: Moving a folder from the resources.. possible?
Add all your resources and then, when you build your project, all your resources ARE part of the EXE. That's the whole point of resources: that they are part of the EXE.
As for adding multiple resources, simply select multiple files when adding a resource. You can add your resources as files in the Solution Explorer and then set their Build Action to Embedded Resource but you're simply making your life harder because accessing them in code is more cumbersome. If you add them on the Resources page of the project properties then you can access them easily using My.Resources.
-
Jun 21st, 2010, 11:16 AM
#8
Thread Starter
Junior Member
Re: Moving a folder from the resources.. possible?
I understand that adding files into the resources will add them into the .EXE, but what I'm wondering is if I can add a folder in the project properties, then put all my modified files in there.
I do understand the concept of My.Resources, but like I said in my previous post, I have over 100 files, and they can be renamed after every release, it would be much easier if I could move the folder within the resources to the game directory.
Ex: Directory.Move(My.Resources.files, GameDir)
-
Jul 6th, 2010, 01:29 PM
#9
Thread Starter
Junior Member
Re: Moving a folder from the resources.. possible?
-
Jul 6th, 2010, 01:40 PM
#10
Re: Moving a folder from the resources.. possible?
It does not look like that is the case... Now... what you COULD do... zip up your folder.. Add the ZIP file... then your app would be able to copy the zip file out of resources, where you could then extract the files and put them where they belong.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|