![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Init BitmapImage from Project resource Hi all, How would I initialize a BitmapImage using a bitmap in the project resources folder? I know I can use the following to do this, but I wondered if there was some more abstract method using My.Resources namespace. Dim bi As New BitmapImage() ' BitmapImage.UriSource must be in a BeginInit/EndInit block. bi.BeginInit() bi.UriSource = New Uri("MyFilePath\bitmap1.bmp", UriKind.RelativeOrAbsolute) bi.EndInit() I muddled around a bit with My.Resources.ResourceManager.GetStream("Bitmap1.bmp"), which returns an UnmanagedMemoryStream, but can't quite get that to work out. Any suggestions would be greatly appreciated. -- John |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| In any project, Can't we refer classes directly, (without addingphysically in the project)? | Rachana | .NET General | 1 | 03-28-2008 04:31 PM |
| Creating an BitmapImage from an ImageBrush? | scott.browse@gmail.com | Avalon | 0 | 08-13-2007 05:46 PM |
| How to manage application scope resource file in a library project ? | Pon | Avalon | 4 | 11-26-2006 04:44 PM |
| BitmapImage and Bitmap (second shot)) | Rhinpoche@star-sw.com | Avalon | 2 | 05-18-2006 10:55 AM |
| Convert BitmapImage to Bitmap? | Rhinpoche@star-sw.com | Avalon | 2 | 05-18-2006 02:27 AM |