Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to add file in resource and show in form?

Posted on 2011-03-14
11
Medium Priority
?
238 Views
Last Modified: 2012-05-11
Hi guys

i want need a form with filedialog for select a file and save to resource

then  show my file in form2

help me plz
0
Comment
Question by:l0o3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 35127988
Can you explain more about what you're trying to do here?

What do you mean by "save to resource"?
0
 
LVL 3

Expert Comment

by:1303gun
ID: 35128380
Hello.

Well, if your intention is to load a file into the application's embedded resource, I'm afraid that this is not possible.

I think that the only way you could do something similar is to use reflection to recompile the current assembly with different resources, but this would create another executable.

If that's of you interest, I can do some research and post here.

But why exactly do you want to load the file into resource? You could create an XML file and insert the file into it as a base 64 string.
0
 

Author Comment

by:l0o3
ID: 35128530
hi Idle_Mind, resource file in vb.net : My project> Resources

hi 1303gun, my files is flash (swf) and image (gif) , can u give me sample with  xml?


tnx
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:1303gun
ID: 35128610
Yes. I'll pepare a sample code and then send you.
0
 

Author Comment

by:l0o3
ID: 35128942
1303gun i am wait. tnx
0
 

Author Comment

by:l0o3
ID: 35128959
Medo3337 i want add file using file dialog in resource
0
 
LVL 3

Accepted Solution

by:
1303gun earned 2000 total points
ID: 35130195
Hello.

Attached is a sample project demonstrating how to store resources in an external XML file.

It's very simple to do it, so I think you won't have problems in understanding it. However if you have any doubts just ask.

The application is programmed only to display SWF and some image formats (including GIF).

Before using, you may have to set the new path for the Shockwave Flash reference in the project settings (My Project > References). If you don't know where these files are located, delete the two Shockwave Flash references and click "Add...". On the reference selection form, go to the COM tab and find Shockwave Flash in the list. Select it and click OK. This should do it.

The project was made in Visual Studio 2010.
XMLResource.zip
0
 

Author Closing Comment

by:l0o3
ID: 35130266
Thank you
0
 
LVL 3

Expert Comment

by:1303gun
ID: 35130419
You're welcome.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question