I am developing a windows based application in which i want that whenever my application get started it should disable mouse click events outside the my application window form.
Can anyone please tell me, how can i achieve that?
Thanks in advance.
Edit :
Catching the mouse click event within the form and suppressing the click action is easy, for that we just use this :
protected override void WndProc(ref Message m)
{
if (m.Msg == (int)MouseMessages.WM_LBUTTONDOWN || m.Msg == (int)MouseMessages.WM_LBUTTONUP)
MessageBox.Show("Click event caught!"); //return; --for suppress the click event action.
else
base.WndProc(ref m);
}
but how to catch the mouse click event outside of the my app form?