Control.BringToFront 메서드

정의

컨트롤을 Z 순서의 맨 앞으로 가져옵니다.

public:
 void BringToFront();
public void BringToFront ();
member this.BringToFront : unit -> unit
Public Sub BringToFront ()

예제

다음 코드 예제를 호출하여 가 Label 표시되도록 합니다 BringToFront . 이 예제에서는 FormPanel 이름이 인 와 라는 panel1Labellabel1가 있어야 합니다.

private:
   void MakeLabelVisible()
   {
      
      /* If the panel contains label1, bring it
         * to the front to make sure it is visible. */
      if ( panel1->Contains( label1 ) )
      {
         label1->BringToFront();
      }
   }
private void MakeLabelVisible()
{
   /* If the panel contains label1, bring it 
   * to the front to make sure it is visible. */
   if(panel1.Contains(label1))
   {
      label1.BringToFront();
   }
}
Private Sub MakeLabelVisible()
   ' If the panel contains label1, bring it 
   ' to the front to make sure it is visible. 
   If panel1.Contains(label1) Then
      label1.BringToFront()
   End If
End Sub

설명

컨트롤이 z 순서의 맨 앞으로 이동됩니다. 컨트롤이 다른 컨트롤의 자식인 경우 자식 컨트롤이 z 순서의 맨 앞으로 이동됩니다. BringToFront 는 컨트롤을 최상위 컨트롤로 만들지 않으며 이벤트를 발생 Paint 시키지 않습니다.

적용 대상

추가 정보