несогласовывается((
- Код: Выделить всё
Option Explicit
Private Const BI_RGB = 0&
Private Declare Function GetDIBits Lib "gdi32" (ByVal aHDC As Long, ByVal hBitmap As Long, ByVal nStartScan As Long, ByVal nNumScans As Long, lpBits As Any, lpBI As BITMAPINFO, ByVal wUsage As Long) As Long
Private Type BITMAPINFOHEADER '40 bytes
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type
Dim f As BITMAPINFOHEADER
Dim Contain() As Byte
Private Sub Command1_Click()
With f
.biSize = LenB(f)
.biWidth = ScaleX(Picture.Width, vbHimetric, vbPixels)
.biHeight = ScaleY(Picture.Width, vbHimetric, vbPixels)
.biPlanes = 1
.biBitCount = 32
.biCompression = 0
.biBitCount = 24
.biCompression = BI_RGB
End With
ReDim Contain(1 To f.biWidth, 1 To f.biHeight) As Byte
Command1.Caption = GetDIBits(hDC, Picture1.Picture, 0, f.biHeight, Contain(1, 1), f, 0)
End Sub
Подскажит, в чем незадача?
Спасибо