ap() As Long
   If m_hBmpOld &lt;&gt; 0 Then
      SelectObject m_hDC, m_hBmpOld
      m_hBmpOld = 0
   End If
   If m_hDC &lt;&gt; 0 Then
      DeleteDC m_hDC
      m_hDC = 0
   End If
   ExtractBitmap = m_hBmp
   ' the responsibility for clearing up
   ' the bitmap now belongs to the caller:
   m_hBmp = 0
   m_bInit = True
End Function
Public Sub InjectBitmap(ByVal hBmp As Long)
Dim tBM As BITMAP
   Destroy
   GetObjectAPI hBmp, Len(tBM), tBM
   Width = tBM.bmWidth
   Height = tBM.bmHeight
   Init hBmp
  