Aracılığıyla paylaş


WindowEventArgs.Window Özellik

Tarafından dikkate pencere alır ActivateEvent, Deactivate, ve WindowSize yöntemleri.

Ad alanı:  Microsoft.Office.Tools.Word
Derleme:  Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Window As Window
    Get
Window Window { get; }

Özellik Değeri

Tür: Microsoft.Office.Interop.Word.Window
Tarafından dikkate pencere ActivateEvent, Deactivate, ve WindowSize yöntemleri.

Örnekler

Aşağıdaki kod örneği için bir olay işleyicisi oluşturur WindowSize olay. Olay işleyicisi kullanır Window özellik penceresinde görüntülemek için başlık sayısı pencere yeniden boyutlandırılamaz.

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private resizeCount As Integer = 0
Private Sub DocumentWindowSize()
    AddHandler Me.WindowSize, AddressOf ThisDocument_WindowSize
End Sub

Private Sub ThisDocument_WindowSize(ByVal sender As Object, ByVal e As Microsoft.Office.Tools.Word.WindowEventArgs)
    resizeCount += 1
    e.Window.Caption = "Window resized " & resizeCount.ToString() & " times."
End Sub
int resizeCount = 0;
private void DocumentWindowSize()
{
    this.WindowSize +=
        new Microsoft.Office.Tools.Word.WindowEventHandler(
        ThisDocument_WindowSize);
}

void ThisDocument_WindowSize(object sender,
    Microsoft.Office.Tools.Word.WindowEventArgs e)
{
    resizeCount++;
    e.Window.Caption = "Window resized " +
        resizeCount.ToString() + " times.";
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

WindowEventArgs Arabirim

Microsoft.Office.Tools.Word Ad Alanı