How to get a right click mouse event? Changing EventArgs to MouseEventArgs causes an error in Form1Designer?

后端 未结 7 1834
-上瘾入骨i
-上瘾入骨i 2020-12-03 09:37

I have a method to detect the left click event that visual studio made by double clicking on the form.

private void pictureBox1_Click(object sender, EventArg         


        
7条回答
  •  星月不相逢
    2020-12-03 10:17

    You should introduce a cast inside the click event handler

    MouseEventArgs me = (MouseEventArgs) e;
    

提交回复
热议问题