Solved

How to add file in resource and show in form?

Posted on 2011-03-14
11
228 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
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 85

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
 
LVL 3

Expert Comment

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

Expert Comment

by:Mohamed Abowarda
ID: 35128902
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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 12

Expert Comment

by:Mohamed Abowarda
ID: 35129016
0
 
LVL 3

Accepted Solution

by:
1303gun earned 500 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now