P
peetersb
Hello,
I want to holddown a button. I use the win32 API like this:
private const int WM_LBUTTONDOWN = 0x0201;
private const int WM_MOUSEACTIVATE = 0x21;
private const int MK_LBUTTON = 0x0001;
[DllImport("user32.dll", SetLastError = true)]
public static extern bool PostMessage(IntPtr hWnd,
[MarshalAs(UnmanagedType.U4)] int Msg, IntPtr wParam, IntPtr lParam);
I tryed post en sendmessage:
bool t = PostMessage(this.buttonHandle, WM_LBUTTONDOWN,
System.IntPtr.Zero, System.IntPtr.Zero);
The method returns true, but nothing happend. I don't see the button
is down?
I also tryed it to move the mouse point first to the button, then send
the WM_LBUTTONDOWN but also no result.
Anybody an idee?
Greets
I want to holddown a button. I use the win32 API like this:
private const int WM_LBUTTONDOWN = 0x0201;
private const int WM_MOUSEACTIVATE = 0x21;
private const int MK_LBUTTON = 0x0001;
[DllImport("user32.dll", SetLastError = true)]
public static extern bool PostMessage(IntPtr hWnd,
[MarshalAs(UnmanagedType.U4)] int Msg, IntPtr wParam, IntPtr lParam);
I tryed post en sendmessage:
bool t = PostMessage(this.buttonHandle, WM_LBUTTONDOWN,
System.IntPtr.Zero, System.IntPtr.Zero);
The method returns true, but nothing happend. I don't see the button
is down?
I also tryed it to move the mouse point first to the button, then send
the WM_LBUTTONDOWN but also no result.
Anybody an idee?
Greets