Solved

How to add file in resource and show in form?

Posted on 2011-03-14
11
232 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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
 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

789 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