Control.BringToFront Método

Definição

Traz o controlo para a frente da ordem z.

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

Exemplos

O seguinte exemplo de código garante que a Label é visível ao chamar o seu BringToFront método. Este exemplo exige que tenhas um Form com um Panel nome panel1, e um Labellabel1nome .

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

Observações

O controlo é movido para a frente da ordem z. Se o controlo for filho de outro controlo, o controlo filho é movido para a frente da ordem z. BringToFront não faz de um controlo um controlo de topo e não eleva o Paint evento.

Aplica-se a

Ver também