hi all
i can't convert this code(Red Code) to c#
who can best convert this code with out problem?
Public Sub HookKeyboard()
callback = New KeyboardHookDelegate(AddressOf KeyboardCallback)
KeyboardHandle = SetWindowsHookEx(13, callback, Process.GetCurrentProcess.MainModule.BaseAddress, 0)
If KeyboardHandle <> 0 Then
Label1.Text = "Active"
Label1.ForeColor = Color.DarkGreen
End If
End Sub
Loading
aaa kljlkjPosted May 28, 2010, 11:01 AM
ajay rajuPosted May 28, 2010, 9:23 AM
try this
public void HookKeyboard()
{
callback = new KeyboardHookDelegate(KeyboardCallback);
KeyboardHandle = SetWindowsHookEx(13, callback, Process.GetCurrentProcess.MainModule.BaseAddress, 0);
if (KeyboardHandle != 0) {
Label1.Text = "Active";
Label1.ForeColor = Color.DarkGreen;
}
}
also check this link.
http://www.developerfusion.com/tools/convert/vb-to-csharp/
if it helps you please mark as accept answer.
Thanks.