问题描述
PrivateSubGet_Screen_Pixel()DimiBitMapAsIntPtrIdc=GetWindowDC(0)DimBit24BitInfoAsBITMAPINFODimDot_Bits(3,Win_Width-1,Win_Height-1)AsByte'DimDot_Bits(4*Win_Width*Win_Height-1)AsByteWithBit24BitInfo.bmiHeader.biPlanes=1.bmiHeader.biBitCount=Win_Color_Bits.bmiHeader.biCompression=0.bmiHeader.biSize=Len(.bmiHeader).bmiHeader.biWidth=Win_Width.bmiHeader.biHeight=Win_Height.bmiHeader.biSizeImage=Win_Width*Win_Height*4EndWithiBitMap=GetCurrentObject(Idc,OBJ_BITMAP)DimGchAsGCHandle=GCHandle.Alloc(Dot_Bits,GCHandleType.Pinned)GetDIBits(Idc,iBitMap,0,Win_Height,Gch.AddrOfPinnedObject,Bit24BitInfo,0)DeleteObject(iBitMap)ReleaseDC(0,Idc)Gch.Free()EndSub
时间: 2024-11-24 23:52:45