|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Convert from C# to VB.NetI 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 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 Show quoteHide quote "Husam" <Hu***@discussions.microsoft.com> wrote in message news:003D6E35-2D11-4778-A24D-2253A6959A35@microsoft.com... > 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 "Husam" <Hu***@discussions.microsoft.com> schrieb: Converting code between .NET programming languages> I have the follwoing Decleration from C# and I want to convert it to > VB.Net : <URL:http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
IsDate("ISomeTimesHateProgrammingMarch2005") = True
Query Builder Cancel a thread - please help Dataset requery Simple (I hope) SteamReader DirectoryInfo question Assigning ListBox Current Selection to TextBox multiple tcp connections FileSystemObject filter? File Info Question extracting part of a graphic in a PictureBox to the clipboard |
|||||||||||||||||||||||