请问能否帮我一下?我在winforms.designer.cs中拥有所有按钮,并将所有按钮都分配了相同的处理程序。处理程序是
我尝试在一个按钮上进行操作,但它没有起作用。
MouseEnter
和MouseLeave
。我需要找到所有按钮并为每个按钮分配不同的MouseEnter
和MouseLeave
。我尝试在一个按钮上进行操作,但它没有起作用。
private void createButton_MouseEnter(object sender, EventArgs e)
{
createButton.Cursor = NativeMethods.LoadCustomCursor(Path.Combine(collection.source, collection.cursor_hand));
switch (Name)
{
case "createButton":
this.createButton.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.create_on));
break;
}
}