Bahasa

Control.BringToFront Metode

Definisi

Membawa kontrol ke depan z-order.

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

Contoh

Contoh kode berikut memastikan bahwa terlihat Label dengan memanggil metodenya BringToFront . Contoh ini mengharuskan Anda memiliki Form dengan Panel bernama panel1, dan bernama Labellabel1.

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

Keterangan

Kontrol dipindahkan ke bagian depan z-order. Jika kontrol adalah anak dari kontrol lain, kontrol anak dipindahkan ke bagian depan z-order. BringToFront tidak membuat kontrol kontrol tingkat atas, dan tidak menaikkan Paint peristiwa.

Berlaku untuk

Lihat juga