how convert VB6 to VB2010 code?
my problem is: how can i convert the 'bmiColors(0 To 255) As RGBQUAD' to VB2010 code?Code:Private Const BI_RGB = 0 Private Const CBM_INIT = &H4 Private Const DIB_RGB_COLORS = 0 Private Type BITMAP '14 bytes bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As Long End Type Private Type BITMAPINFOHEADER 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 Private Type BGRAQUAD B As Byte g As Byte R As Byte A As Byte End Type Private Type RGBQUAD B As Byte g As Byte R As Byte A As Byte End Type Private Type BITMAPINFO bmiHeader As BITMAPINFOHEADER bmiColors(0 To 255) As RGBQUAD End Type
VB2010 don't have 'type' so must be 'structure'.... and the variables must be with 'dim' or 'public'.





Reply With Quote