Option Compare Database
Option Explicit
#If Win64 Then
Private Declare PtrSafe Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long
#Else
Private Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long
#End If
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
Dim Bits() As Byte, Informe As BITMAP
Dim Imagen As IPictureDisp
Dim Fichero As String
Private Sub Form_Load()
Me.txtImagen.Value = Me.imgCalendar.PictureData
Fichero = vStr
Set Imagen = LoadPicture(Fichero)
GetObject Imagen, Len(Informe), Informe
Me.txtAncho = CLng(Informe.bmWidth)
Me.txtAlto = CLng(Informe.bmHeight)
Me.txtBites = CInt(Informe.bmBitsPixel)
End Sub