Private Type BITMAP bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As Long End Type
Private Declare Function GetObjectAPI Lib "gdi32" Alias "GetObjectA" (ByVal _ hObject As Long, ByVal nCount As Long, lpObject As Any) As Long
Sub GetBitmapInfo(pict As StdPicture, Width As Long, Height As Long, _ ColorPlanes As Integer, BitsPerPixel As Integer) Dim bmp As BITMAP GetObjectAPI pict, Len(bmp), bmp Width = bmp.bmWidth Height = bmp.bmHeight ColorPlanes = bmp.bmPlanes BitsPerPixel = bmp.bmBitsPixel End Sub |