Application.ActiveWindow property (Visio)
Returns the active Window object. Read-only.
Syntax
expression.ActiveWindow
expression A variable that represents an Application object.
Return value
Window
Remarks
The active window can be one of the following window types: Drawing, Stencil, ShapeSheet, Edit Icon, or a Drawing or Stencil window created by an add-on.
The application's active window can only be an MDI frame window—it cannot be one of the floating, docked, or anchored windows. For a complete list of window types, see the Window.Type property.
If a window in an instance of Microsoft Visio is not active, the ActiveWindow property returns Nothing.
If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this property maps to the following types:
- Microsoft.Office.Interop.Visio.IVApplication.ActiveWindow
Example
The following Microsoft Visual Basic for Applications (VBA) macro shows how to get the active window without qualification from the Microsoft Office Visio global object, which is automatically available to VBA code that is part of the VBA project of a Visio document.
Public Sub ActiveWindow_Example()
Dim vsoWindow As Visio.Window
'Get the active window.
Set vsoWindow = ActiveWindow
'To verify that we got the active window, print its caption.
Debug.Print vsoWindow.Caption
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기