Windows Develop Bookmark and Share   
 index > Windows Forms General > Images and Forms
 

Images and Forms

Hello,
I have a logo that I paste on each of the windows form for an application that I am developing. I'd like to know if individually pasting this image on each form increases the overall size of the EXE.
If yes, is there a better way to incoroporate these images on each of these forms.
I had an idea of making a picture box control in the application and then using that over each form (this would cause shared references).  I am sure there are better ways to do it.
any help would be appreciated.
MigrationUser 1  Monday, December 22, 2003 12:45 PM
You can use manifest resources.  These are special resources that get embedded as binary streams inside of your assembly.  VS accomplishes this feat when you simply drag images into the project.  These images will be embedded as is and you'll be able to access them through code.

The methods you want to look at will be, Assembly.GetManifestResourceNames to find all of your embedded resources, and Assembly.GetManifestResourceStream in order to reconstruct the data.  Since you get a Stream back, you can pass this on to the Bitmap constructors that take a Stream.
MigrationUser 1  Monday, December 22, 2003 5:29 PM

You can use google to search for other answers

Custom Search

More Threads

• How to pass datagrid reference to the usercontrol class
• Binding a DropDownList
• Setting a window's content to display an image stored in a saved image file
• mdiparent not resetting mdichild position
• SaveFileDialog actions wrong
• Windows Forms Tab Control problem !!
• how can i change property of my control when form property changed?
• How to display picturebox object in Windows form?
• How to add Windows Media Player Activex Control to WinForms application?
• Animated image problem