468,471 Members | 1,695 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,471 developers. It's quick & easy.

Converting C# to VB.net question

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
0 1006

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by j.a. harriman | last post: by
3 posts views Thread by Derek Martin | last post: by
3 posts views Thread by Michael | last post: by
2 posts views Thread by Map Reader | last post: by
32 posts views Thread by robert d via AccessMonster.com | last post: by
4 posts views Thread by gg9h0st | last post: by
15 posts views Thread by jaks.maths | last post: by
16 posts views Thread by manmit.walia | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.