"Serge" <se***@NOSPAM.com> wrote in message
news:41***********************@news.skynet.be...
Hi,
in my windows.forms application I have added a goupBox control to my
windows.form.
Now I want to know the x,y-position from the mouse cursor when I click on
the groupBox.
The strange thing is that the mouse click event does not exist.
Does anyone know how to get teh x,y position of the mouse cursor when you
click in a groupbox control ?
Simply using the mouseclick event from the form does not work because the
event is never fired.
Regards, Serge
You can code one for yourself, even though the Click is not listed in the
events list for a GroupBox.
Use a generated event procedure shell, such as the shell for the Enter event
and change it as follows:
private void groupBox1_Click(object sender, System.EventArgs e)
{
MessageBox.Show("The click event!");
}
You'll also have to edit the entry in the InitializeComponent method for the
enter event to something like this:
this.groupBox1.Click += new System.EventHandler(this.groupBox1_Click);
Works for me.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.