Shape.MouseLeave 이벤트
마우스 포인터가 도형에 벗어나면 발생 합니다.
네임스페이스: Microsoft.VisualBasic.PowerPacks
어셈블리: Microsoft.VisualBasic.PowerPacks.Vs(Microsoft.VisualBasic.PowerPacks.Vs.dll)
구문
‘선언
<BrowsableAttribute(True)> _
Public Event MouseLeave As EventHandler
[BrowsableAttribute(true)]
public event EventHandler MouseLeave
[BrowsableAttribute(true)]
public:
event EventHandler^ MouseLeave {
void add (EventHandler^ value);
void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member MouseLeave : IEvent<EventHandler,
EventArgs>
JScript에서는 이벤트를 지원하지 않습니다.
설명
마우스 이벤트는 다음 순서대로 발생합니다.
MouseHover / MouseDown / MouseWheel
MouseLeave
이벤트를 처리하는 방법에 대한 자세한 내용은 이벤트 사용을 참조하십시오.
예제
도형 위로 마우스를 이동할 때 다음은 상태 표시줄에 메시지를 표시 합니다.이 예제에서는 있어야는 RectangleShape RectangleShape1 이라는 컨트롤 하는 StatusStrip 폼에 StatusStrip1 이라는 컨트롤.StatusStrip 있어야 합니다는 ToolStripStatusLabel ToolStripStatusLabel1 라는.
Private Sub RectangleShape1_MouseEnter(
) Handles RectangleShape1.MouseEnter
ToolStripStatusLabel1.Text = "The mouse has entered the shape."
End Sub
Private Sub RectangleShape1_MouseHover(
) Handles RectangleShape1.MouseHover
ToolStripStatusLabel1.Text = "The mouse is paused over the shape."
End Sub
Private Sub RectangleShape1_MouseLeave(
) Handles RectangleShape1.MouseLeave
ToolStripStatusLabel1.Text = "The mouse has left the shape."
End Sub
Private Sub RectangleShape1_MouseMove(
) Handles RectangleShape1.MouseMove
ToolStripStatusLabel1.Text = "The mouse is over the shape."
End Sub
private void rectangleShape1_MouseEnter(object sender, System.EventArgs e)
{
toolStripStatusLabel1.Text = "The mouse has entered the shape.";
}
private void rectangleShape1_MouseHover(object sender, System.EventArgs e)
{
toolStripStatusLabel1.Text = "The mouse is paused over the shape.";
}
private void rectangleShape1_MouseLeave(object sender, System.EventArgs e)
{
toolStripStatusLabel1.Text = "The mouse has left the shape.";
}
private void rectangleShape1_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
toolStripStatusLabel1.Text = "The mouse is over the shape.";
}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.
참고 항목
참조
Microsoft.VisualBasic.PowerPacks 네임스페이스
기타 리소스
방법: LineShape 컨트롤로 선 그리기(Visual Studio)
방법: OvalShape 및 RectangleShape 컨트롤을 사용하여 도형 그리기(Visual Studio)