Input Panel

J

JJ

Hi Guys,

I am trying to convert a program from eVB to C# and am stuck with
changing over the PostKeybdMessage API call.
Here is the API call:

public static bool PostKeybdMessage(

HWND hwnd,

UINT VKey,

KEY_STATE_FLAGS KeyStateFlags,

UINT cCharacters,

UINT* pShiftStateBuffer,

UINT* pCharacterBuffer

);

What is the equivalent for a VB long (UINT in C++) to a C# data type ?

Thanks,

JJ
 
J

JJ

ok so I can use either uint or uint32 both are equivalent ? Also how do I
get a handle to a window in C#?

Thanks,

JJ
 
E

Erdem ALKILIÇGiL

using System.Runtime.InteropServices;

[DllImport("coredll")]
public static extern IntPtr GetFocus();


public IntPtr GetHandle(Control c)
{
c.Focus();
IntPtr hWnd = GetFocus();
return hWnd;
}
 

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