![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| In any project, Can't we refer classes directly, (without addingphysically in the project)? | .NET General | |||