Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-01-2009
Member
 
Join Date: Oct 2005
Posts: 449
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.
__________________
Determined and Forceful
Emotional and Intuitive
Powerful and Passionate
Exciting and Magnetic
Reply With Quote
  #2  
Old 31-01-2009
Member
 
Join Date: Jan 2008
Posts: 56
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.
Reply With Quote
  #3  
Old 31-01-2009
Member
 
Join Date: May 2008
Posts: 13
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
Reply With Quote
  #4  
Old 31-01-2009
Member
 
Join Date: Oct 2005
Posts: 449
Re: Code C# to VB

Thanks for the quick reply.
I will try both the solutions.
__________________
Determined and Forceful
Emotional and Intuitive
Powerful and Passionate
Exciting and Magnetic
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Code C# to VB"
Thread Thread Starter Forum Replies Last Post
Need help on removing Activation Required message BlackBerry 9930 Bold with MSL code SPC code Groupism Portable Devices 15 02-05-2014 03:00 PM
startup error code:0x80090006 ,,unable to locate activation code Mr.Walter Windows XP Support 3 04-01-2012 06:08 PM
How to calculate the Master Code of Nokia phone in case you forget your security/lock code? darshit Tips & Tweaks 25 28-12-2011 07:58 PM
Error code 801613C9 while entering gold membership code in Xbox 360 Boreanaz Portable Devices 5 08-07-2011 07:53 PM
Nokia 3500C: How to change the security code or locked code? Keval-B Portable Devices 4 05-10-2010 07:08 PM


All times are GMT +5.5. The time now is 02:20 PM.