DrawToolTipEventArgs.AssociatedWindow Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bunun ToolTip bağlı olduğu pencereyi alır.
public:
property System::Windows::Forms::IWin32Window ^ AssociatedWindow { System::Windows::Forms::IWin32Window ^ get(); };
public System.Windows.Forms.IWin32Window AssociatedWindow { get; }
public System.Windows.Forms.IWin32Window? AssociatedWindow { get; }
member this.AssociatedWindow : System.Windows.Forms.IWin32Window
Public ReadOnly Property AssociatedWindow As IWin32Window
Özellik Değeri
öğesinin sahibi ToolTipolan pencere.
Örnekler
Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir. Örnekte, olay işleyicisi olayın oluşumunu ToolTip.Draw bildirir. Bu rapor, olayın ne zaman gerçekleştiğini öğrenmenize yardımcı olur ve hata ayıklamada size yardımcı olabilir.
Örnek kodu çalıştırmak için, adlı ToolTiptürünün ToolTip1 bir örneğini içeren bir projeye yapıştırın. Ardından olay işleyicisinin olayla ilişkilendirildiğinden ToolTip.Draw emin olun.
private void ToolTip1_Draw(Object sender, DrawToolTipEventArgs e) {
System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Graphics", e.Graphics );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "AssociatedWindow", e.AssociatedWindow );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "AssociatedControl", e.AssociatedControl );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Bounds", e.Bounds );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ToolTipText", e.ToolTipText );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Font", e.Font );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "Draw Event" );
}
Private Sub ToolTip1_Draw(sender as Object, e as DrawToolTipEventArgs) _
Handles ToolTip1.Draw
Dim messageBoxVB as New System.Text.StringBuilder()
messageBoxVB.AppendFormat("{0} = {1}", "Graphics", e.Graphics)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "AssociatedWindow", e.AssociatedWindow)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "AssociatedControl", e.AssociatedControl)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Bounds", e.Bounds)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ToolTipText", e.ToolTipText)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Font", e.Font)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(),"Draw Event")
End Sub
Açıklamalar
Bir pencere başka bir pencereye ait olduğunda, sahip olunan pencere simge durumuna küçültülür ve sahip penceresiyle kapatılır. Sahip olunan pencereler de hiçbir zaman sahip formlarının arkasında görüntülenmez. Burada ToolTip özelliğiyle temsil edilen yerel Win32 penceresine AssociatedWindow aittir.