Input Panel

  • Thread starter Thread starter JJ
  • Start date Start date
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
 
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
 
using System.Runtime.InteropServices;

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


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