|
-
Oct 30th, 2010, 03:10 AM
#2
Re: Files in resources
1. No.
2. No.
Resources are not files. They are data compiled into your EXE. One of the main reasons for resources is that they cannot be changed.
An Adobe Reader control doesn't provide the ability for you to pass it binary data. All you can do is provide file path and it will load the file itself. If you embed a PDF file as a resource then you'd have to extract the data and save it as a file, then point the control to that file. You could always use the Temp folder, which exists specifically for this type of thing, then delete the file when you're finished.
If you embed a text file as a resource then you'll get it back as a String. You can then do whatever you like with that String, e.g. save it as a file or display it. You can edit the String but that won;t affect the resource, so the next time you run the app the resource will be as it was. If you want to store an editable string then you could use My.Settings, but then it will be stored in a file anyway, so you may as well just use the original file. You should think about where you store it though, as some places make more sense than others.
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
|