Private Declare Function GetObjectAPI Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long
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
Public Sub psize()
Dim bm As BITMAP
Dim picPicture As IPictureDisp
Set picPicture = stdole.LoadPicture("e:\gta.bmp")
Call GetObjectAPI(picPicture, Len(bm), bm)
MsgBox "大小 : " & bm.bmWidth & "×" & bm.bmHeight
End Sub