Convert from C# to VB.Net

G

Guest

Hi EveryBody:

I have the follwoing Decleration from C# and I want to convert it to VB.Net :

public const int DISPID_HTMLELEMENTEVENTS_ONDBLCLICK =
unchecked((int)0xFFFFFDA7),

[Flags]
public enum BSCFlags {
BSCF_FIRSTDATANOTIFICATION = 0x00000001,
BSCF_INTERMEDIATEDATANOTIFICATION = 0x00000002,
BSCF_LASTDATANOTIFICATION = 0x00000004,
BSCF_DATAFULLYAVAILABLE = 0x00000008,
BSCF_AVAILABLEDATASIZEUNKNOWN = 0x00000010
}

[ComVisible(false)]
public sealed class OLECMDEXECOPT {
public const int OLECMDEXECOPT_DODEFAULT = 0;
public const int OLECMDEXECOPT_PROMPTUSER = 1;
public const int OLECMDEXECOPT_DONTPROMPTUSER = 2;
public const int OLECMDEXECOPT_SHOWHELP = 3;
}

[ComVisible(false), StructLayout(LayoutKind.Sequential)]
public sealed class tagLOGPALETTE {
[MarshalAs(UnmanagedType.U2)/*leftover(offset=0, palVersion)*/]
public short palVersion;

any one can help me in this or direct me to any like that care about
converting from C# to VB.Net

Any help will be appreciated

regard's

Husam
 
A

AMDRIT

Try this

'ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vclrfUnchecked.htm
'It doesn't appear that VB has to concern itself with the unchecked
statement.
Public Const DISPID_HTMLELEMENTEVENTS_ONDBLCLICK As Integer = &HFFFFFDA7

'ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemflagsattributeclasstopic.htm
'Flags just treats the enumeration as a bit field.
<Flags()> _
Public Enum BSCFlags
BSCF_FIRSTDATANOTIFICATION = 1
BSCF_INTERMEDIATEDATANOTIFICATION = 2
BSCF_LASTDATANOTIFICATION = 4
BSCF_DATAFULLYAVAILABLE = 8
BSCF_AVAILABLEDATASIZEUNKNOWN = 10
End Enum

'ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csspec/html/vclrfcsharpspec_10_1_1_1.htm
<System.Runtime.InteropServices.ComVisible(False)> _
Public MustInherit Class OLECMDEXECOPT
Public Const OLECMDEXECOPT_DODEFAULT As Integer = 0
Public Const OLECMDEXECOPT_PROMPTUSER As Integer = 1
Public Const OLECMDEXECOPT_DONTPROMPTUSER As Integer = 2
Public Const OLECMDEXECOPT_SHOWHELP As Integer = 3
End Class

'This class seemed to be incomplete to me. But I am just a novice.
'ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemRuntimeInteropServicesStructLayoutAttributeClassTopic.htm
<System.Runtime.InteropServices.ComVisible(False),
System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)>
_
Public MustInherit Class tagLOGPALETTE
'/*leftover(offset=0, palVersion)*/
'ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemRuntimeInteropServicesMarshalAsAttributeClassTopic.htm
<System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.U2)>
_
Public palVersion As Short
End Class


Husam said:
Hi EveryBody:

I have the follwoing Decleration from C# and I want to convert it to
VB.Net :

public const int DISPID_HTMLELEMENTEVENTS_ONDBLCLICK =
unchecked((int)0xFFFFFDA7),

[Flags]
public enum BSCFlags {
BSCF_FIRSTDATANOTIFICATION = 0x00000001,
BSCF_INTERMEDIATEDATANOTIFICATION = 0x00000002,
BSCF_LASTDATANOTIFICATION = 0x00000004,
BSCF_DATAFULLYAVAILABLE = 0x00000008,
BSCF_AVAILABLEDATASIZEUNKNOWN = 0x00000010
}

[ComVisible(false)]
public sealed class OLECMDEXECOPT {
public const int OLECMDEXECOPT_DODEFAULT = 0;
public const int OLECMDEXECOPT_PROMPTUSER = 1;
public const int OLECMDEXECOPT_DONTPROMPTUSER = 2;
public const int OLECMDEXECOPT_SHOWHELP = 3;
}

[ComVisible(false), StructLayout(LayoutKind.Sequential)]
public sealed class tagLOGPALETTE {
[MarshalAs(UnmanagedType.U2)/*leftover(offset=0, palVersion)*/]
public short palVersion;

any one can help me in this or direct me to any like that care about
converting from C# to VB.Net

Any help will be appreciated

regard's

Husam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top