By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

Converting C# to VB.net question

P: n/a
H
I am try to convert C# to vb.net I don’t know what would be an equivalent statements in VB.net any help will be appreciated

[StructLayout(LayoutKind.Sequential)
public class BITMAPINFOHEADER
public int biSize = Marshal.SizeOf(typeof(BITMAPINFOHEADER)
public int biWidt
public int biHeigh
public short biPlane
public short biBitCoun
public int biCompressio
public int biSizeImag
public int biXPelsPerMete
public int biYPelsPerMete
public int biClrUse
public int biClrImportan
' <summary
' Holds all bitmap informatio
' </summary
[StructLayout(LayoutKind.Sequential)
public class BITMAPINFO
public BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER(

[MarshalAs(System.Runtime.InteropServices.Unmanaged Type.ByValArray, SizeConst=BITMAPINFO_MAX_COLORSIZE*4)
public byte[] bmiColors ' RGBQUAD structs... Blue-Green-Red-Reserved, repeat..
' <summary
' Palette entry structur
' </summary
[StructLayout(LayoutKind.Sequential)
public struct PALETTEENTRY
public byte peRe
public byte peGree
public byte peBlu
public byte peFlag
' <summary
' Holds all bitmap information in a flat structure (contains no other classes or structs
' </summary
[StructLayout(LayoutKind.Sequential)
public struct BITMAPINFO_FLAT
public int bmiHeader_biSize' = Marshal.SizeOf(typeof(BITMAPINFOHEADER)
public int bmiHeader_biWidt
public int bmiHeader_biHeigh
public short bmiHeader_biPlane
public short bmiHeader_biBitCoun
public int bmiHeader_biCompressio
public int bmiHeader_biSizeImag
public int bmiHeader_biXPelsPerMete
public int bmiHeader_biYPelsPerMete
public int bmiHeader_biClrUse
public int bmiHeader_biClrImportan

[MarshalAs(System.Runtime.InteropServices.Unmanaged Type.ByValArray, SizeConst=BITMAPINFO_MAX_COLORSIZE*4)
public byte[] bmiColors ' RGBQUAD structs... Blue-Green-Red-Reserved, repeat..
' Native method
[DllImport("gdi32")
public static extern int GetPaletteEntries(int hpal, int iStartIndex, int nEntries, byte[] lppe
[DllImport("gdi32")
public static extern int GetSystemPaletteEntries(int hdc, int iStartIndex, int nEntries, byte[] lppe
[DllImport("gdi32")
public static extern int CreateDIBSection(int hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref int ppvBits, int hSection, int dwOffset
[DllImport("gdi32")
public static extern int GetObjectType(int hobject
[DllImport("gdi32")
public static extern int CreateCompatibleDC(int hDC
[DllImport("gdi32")
public static extern int CreateCompatibleBitmap(int hDC, int width, int height
[DllImport("gdi32")
public static extern int GetDIBits(int hdc, int hbm, int arg1, int arg2, int arg3, NativeMethods.BITMAPINFOHEADER bmi, int arg5
[DllImport("gdi32")
public static extern int GetDIBits(int hdc, int hbm, int arg1, int arg2, int arg3, ref NativeMethods.BITMAPINFO_FLAT bmi, int arg5
[DllImport("gdi32")
public static extern int SelectObject(int hdc, int obj
[DllImport("gdi32")
public static extern bool DeleteObject(int hObject
[DllImport("gdi32")]
public static extern bool DeleteDC(int hDC)
[DllImport("gdi32")]
public static extern bool BitBlt(int hDC, int x, int y, int nWidth, int nHeight,
int hSrcDC, int xSrc, int ySrc, int dwRop)
[DllImport("gdi32")]
public static extern int GetDeviceCaps(int hDC, int nIndex)
}

Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.