|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to extract icon (or resource) ?Hi,
In VB 2005, How to extract icons (or images or other resources) from a file ..resx, .resource, .dll or .exe and then to create a new file with this resource (.ico, .jpg ..) ? Thanks Dominique Hi Dominique,
The general approach is to get the resource stream using Assembly.GetManifestResourceStream with the full qualified name for the resource (namespace.resourcefile, case sensitive), and then you use the image constructors that take a stream as input parameter: Dim objStream As System.IO.Stream Dim objBitmap As System.Drawing.Bitmap objStream = System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(resourceNamespace.resourceName) objBitmap = New System.Drawing.Bitmap(objStream) objStream.Close() VB 2005 offers the use of the methods of My.Resources.ResourceManager.GetXXX -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "DG78" <DG78@community.nospam> escribió en el mensaje news:eM0qDh4YGHA.4760@TK2MSFTNGP03.phx.gbl... > Hi, > > In VB 2005, How to extract icons (or images or other resources) from a > file .resx, .resource, .dll or .exe and then to create a new file with > this resource (.ico, .jpg ..) ? > > Thanks > > Dominique > > > Hi Carlos,
Thanks you very much for your answer. I think the solution in VB 2005 is with My.Resources.ResourceManager (many links in google and an article in msdn number of may 06). Cheers Dominique
How to call IE to open a new page.
Listview SubItems image index Emailing with default client Writing INI section failing webbrowser System.IO.FileNotFoundException 1.1 and 2.0 .Net framework in same application? Is it possible to compile an image file into a DLL or EXE file? how to move a form that FormBorderStyle is None Listview item key Printing rotated text |
|||||||||||||||||||||||