I want to be able to tell when the mouse left clicks even when my
application doesn't have focus.
I tried adding this to my form
------------------------------------------
protected override void WndProc(ref Message m) {
if(m.Msg == WM_NCLBUTTONDOWN) {
System.Windows.Forms.MessageBox.Show("Mouse Clicked");
}
base.WndProc(ref m);
}
------------------------------------------
But I only recive the "Mouse Clicked" MessageBox when my application
has focus.
I also tried setting a hotkey and listening for the "WM_HOTKEY" but
"RegisterHotKey(this.Handle, 101, 0, (uint)Keys.LButton)" doesn't seem
to caputre the left clicks eventhough it says it successfully
registered the hotkey.
I also tried with "uint VK_LBUTTON = 0x01" &
RegisterHotKey(this.Handle, 101, 0, VK_LBUTTON) but doesn't work.
NOTE: The hotkey method works if I change the "(uint)Keys.LButton" to
an actual keyboard key "IE (uint)Keys.F1".
Any help would be great ;)
NB