locked
How to add Onclick event for PictureBox RRS feed

  • Question

  •  

    Hi,

     

    I want to perform a few things on PictureBox Control.

     

    1. When user click the PictureBox Control, I want to capture the (x,y) coordinates of the click.

     

    In aspnet, there are events for ImageButton. How can I achieve this in Dotnet WinForm application?

     

    Hope some1 can show me how this can be done.

     

    Thanks

    Sunday, December 30, 2007 3:20 AM

Answers

  • The MouseClick event:

    private void pictureBox1_MouseClick(object sender, MouseEventArgs e)

    {

    Point MouseLocation = e.Location

    }

    Sunday, December 30, 2007 9:56 AM