How to add file in resource and show in form?

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
l0o3Asked:
Who is Participating?
 
1303gunCommented:
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
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Can you explain more about what you're trying to do here?

What do you mean by "save to resource"?
0
 
1303gunCommented:
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
l0o3Author Commented:
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
 
1303gunCommented:
Yes. I'll pepare a sample code and then send you.
0
 
l0o3Author Commented:
1303gun i am wait. tnx
0
 
l0o3Author Commented:
Medo3337 i want add file using file dialog in resource
0
 
Mohamed AbowardaSoftware EngineerCommented:
0
 
l0o3Author Commented:
Thank you
0
 
1303gunCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.