title: How to convert Bitmap to BitmapImage for WPF VB.NET
body: <p>I'm trying to convert a Bitmap to a BitmapImage in WPF. Basically, I'm starting with a Bitmap created in memory (from another process) and I need to use it elsewhere, but as a BitmapImage.</p>
  
  <p>I found this answer <a href="https://stackoverflow.com/questions/6484357/converting-bitmapimage-to-bitmap-and-vice-versa">question 6484357</a>, but the author's function Bitmap2BitmapImage does not work (at least in DotNet4.5) as there is no such method called Imaging.CreateBitmapSourceFromHBitmap - so no luck there (at least no way to convert to a VB.Net equivalent function). </p>