How can I get the mouse coordinates related to a panel?
问题 I am trying to get the coordinates of a click with the mouse in C# related to a panel in my form, but I don't know how to do that. I'm a begginer and I don't have any experience with events. Thanks! 回答1: You must subscribe to event of Panel control - Click event. You can write the code below within Form's contructor: System.Windows.Forms.Panel panel; public Form() { InitializeComponent(); panel = new System.Windows.Forms.Panel(); panel.Location = new System.Drawing.Point(82, 132); panel.Size