鼠标移动到label控件时文字鼠标变为手型,并且文字显示灰色加下划线
private void label_1_MouseEnter(object sender, EventArgs e) { Cursor = Cursors.Hand; ((Label)sender).ForeColor = Color.Gray; ((Label)sender).Font = new Font(Var_Font, Var_Font.Style | FontStyle.Underline); } private void label_1_MouseLeave(object sender, EventArgs e) { Cursor = Cursors.Default; ((Label)sender).ForeColor = Color.Red; ((Label)sender).Font = new Font(Var_Font, Var_Font.Style); }