本文整理匯總了C#中System.Windows.Forms.ControlPaint.DrawReversibleLine方法的典型用法代碼示例。如果您正苦於以下問題:C# ControlPaint.DrawReversibleLine方法的具體用法?C# ControlPaint.DrawReversibleLine怎麽用?C# ControlPaint.DrawReversibleLine使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.ControlPaint
的用法示例。
在下文中一共展示了ControlPaint.DrawReversibleLine方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Button3_MouseHover
// When the mouse hovers over Button3, two reversible lines are
// drawn using the corner coordinates of Button3, which are first
// converted to screen coordinates.
private void Button3_MouseHover(object sender, System.EventArgs e)
{
ControlPaint.DrawReversibleLine(Button3.PointToScreen(
new Point(0, 0)), Button3.PointToScreen(
new Point(Button3.ClientRectangle.Right,
Button3.ClientRectangle.Bottom)), SystemColors.Control);
ControlPaint.DrawReversibleLine(Button3.PointToScreen(
new Point(Button3.ClientRectangle.Right,
Button3.ClientRectangle.Top)),
Button3.PointToScreen(new Point(Button1.ClientRectangle.Left,
Button3.ClientRectangle.Bottom)), SystemColors.Control);
}
// When the mouse moves from Button3, the reversible lines are erased by
// using the same coordinates as are used in the Button3_MouseHover method.
private void Button3_MouseLeave(object sender, System.EventArgs e)
{
ControlPaint.DrawReversibleLine(Button3.PointToScreen(
new Point(0, 0)), Button3.PointToScreen(
new Point(Button3.ClientRectangle.Right,
Button3.ClientRectangle.Bottom)), SystemColors.Control);
ControlPaint.DrawReversibleLine(Button3.PointToScreen(
new Point(Button3.ClientRectangle.Right,
Button3.ClientRectangle.Top)),
Button3.PointToScreen(new Point(Button3.ClientRectangle.Left,
Button3.ClientRectangle.Bottom)), SystemColors.Control);
}