473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1134

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Armand Karlsen | last post by:
I have a website ( http://www.zen62775.zen.co.uk ) that I made HTML 4.01 Transitional and CSS compliant, and I'm thinking of converting it into XHTML to learn a little about it. Which XHTML variant...
3
by: j.a. harriman | last post by:
Hi, On MSDN I know there is a JScript example (Upgrading Visual C++ Projects to Visual Studio .NET in Batch Mode) to upgrade VS6 C++ projects to .NET solutions. It converts the project files...
1
by: Hul Tytus | last post by:
comp.lang.c converting a point known by 4 distances to xyz coordinates? Amongst all the librarys on the internet there is certainly source for a routine that converts a point known by 4...
3
by: Derek Martin | last post by:
Hi there, kind of a dumb question, but it falls in line with not understanding (go figure) every nuance about .Net. Is it relatively straight forward to convert a VB.Net built app to an ASP.Net...
3
by: Michael | last post by:
Hi All, I need a little help converting a class to vb.net. I have the following to convert: internal class BBBSDIForm : BBBForm { public BBBSDIForm(FormInfo fi, FormMgr formMgr) : base(fi,...
2
by: Map Reader | last post by:
Greetings, I am converting an old VB6 application to use .NET. One of the old controls loads icons from the disk and displays them. However, the transparent color turns to blue somewhere in the...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
4
by: gg9h0st | last post by:
i'm a newbie studying php. i was into array part on tutorial and it says i'll get an array having keys that from member variable's name by converting an object to array. i guessed "i can...
15
by: jaks.maths | last post by:
How to convert negative integer to hexadecimal or octal number? Ex: -568 What is the equivalent hexadecimal and octal number??
16
by: manmit.walia | last post by:
Hello All, I have tried multiple online tools to convert an VB6 (bas) file to VB.NET file and no luck. I was hoping that someone could help me covert this. I am new to the .NET world and still...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.