我希望左键增加,右键减少 我尝试了代码中显示的内容
private:System :: Void button4_MouseDown(System :: Object ^发送者,System :: Windows :: Forms :: MouseEventArgs ^ e){
switch (MouseButtons)
{
case MouseButtons.Left:
c = Convert::ToInt32(bc->Text);
c++;
bc->Text = c.ToString();
break;
case MouseButtons.right:
c = Convert::ToInt32(bc->Text);
c--;
bc->Text = c.ToString();
break;
}
}
但是我收到此错误
错误(活动)“ this”不能在常量表达式中使用