-
Code C# to VB
Hi,
I want to convert this C# code into VB.
Please help.
Code:
private const int RF_TESTMESSAGE = 0xA123;
[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern int SendMessage(IntPtr hwnd,
[MarshalAs(UnmanagedType.U4)] int Msg, uint wParam, ulong lParam);
Thanking you in advance.
-
Re: Code C# to VB
Please try this code:-
Code:
Private Const RF_TESTMESSAGE As Integer = 41251
<DllImport("user32.dll", CharSet := CharSet.Auto, SetLastError :=
True)> _
Public Shared Function SendMessage(ByVal hwnd As IntPtr,
<MarshalAs(UnmanagedType.U4)> _
ByVal Msg As Integer, ByVal wParam As UInteger, ByVal lParam As ULong)
As Integer
End Function
Hope this works.
-
Re: Code C# to VB
Private Const RF_TESTMESSAGE As Integer = &HA123
<DllImport("user32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function SendMessage(ByVal hwnd As IntPtr,
<MarshalAs(UnmanagedType.U4)> ByVal Msg As Integer, ByVal wParam As UInteger,
ByVal lParam As ULong) As Integer
End Function
-
Re: Code C# to VB
Thanks for the quick reply.
I will try both the solutions. :)
Page generated in 1,713,566,379.22570 seconds with 10 queries