I'm trying to learn C# on my own... I'd appreciate it very much if someone
can help me out here.
I have a basic form without any controls on it... I want to catch mouse
clicks (both left and right). When I select the form and go to the events
tab (the bolt icon in properties), it gives me several options to choose
from...
Under 'Action', I have Click and MouseClick and under 'Mouse', I see various
mouse events listed. Can anyone tell me what is the basic difference between
all of these? And how do I go about catching right-button click?
Thank you for all your help
Regards,
Adeel
"Adeel" <dontWantSpam@All> wrote in message
news:%23tSl6Xy...@TK2MSFTNGP02.phx.gbl...
Reading the docs will give you a very good idea of what each event means, of
course they are self explanatories to start with
--
Ignacio Machin
machin AT laceupsolutions com
However there is simple and brief explanation what the difference is. Click
event is generic even - take a look on the Button control for example it can
be clicked by the mouse, by pressing space key when the focus is on the
button, pressing the enter when the button is set as a default button, etc.
These are all click and the Click event will be fired for all thouse
actions. In contrast MouseClick (which is new for .NET 2.0 btw) is firead
only if the button has been clicked by using the mouse. Because of that it
can provied more information related to the mouse such as Which mouse has
been used to perform the click, how many times the mouse button has been
clicked, etc. This infromation comes packed as event arguments object.
Once again I'd suggest to consult the docs; usually the provide enough
information.
--
HTH
Stoitcho Goutsev (100)
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.com> wrote in
message news:uf1JpDzO...@TK2MSFTNGP02.phx.gbl...
The search utility included in MSDN doesn't return correct results at
times... and without knowing how the pages have been organized, it is very
difficult to locate the correct articles. Any pointers there...? A link
would be useful..
Thanks
Regards,
Adeel
In the MSDN search box I typed in "MouseClick Click" and the second result
from the top was the following article:
Windows Forms Programming
Mouse Events in Windows Forms
http://msdn2.microsoft.com/en-us/library/ms171542.aspx
HTH
--
Dave Sexton
http://davesexton.com/blog
"Adeel" <dontWantSpam@All> wrote in message
news:Okayi$1OHHA...@TK2MSFTNGP03.phx.gbl...
Regards,
Adeel