WindowState 属性 (ActiveX) 
指定应用程序或文档窗口的状态。 支持的平台:仅限 Windows 属性值只读:不 类型:枚举acWindowState 
 言论没有其他评论。 例子VBA: Sub Example_WindowState()
    ' This example reads and displays the current window state of the AutoCAD application.
    Dim CurrentState As String
    
    ' Use the "WindowState" variable to determine the window state of AutoCAD
    Select Case WindowState
        Case acMin: CurrentState = "Minimized"
        Case acMax: CurrentState = "Maximized"
        Case acNorm: CurrentState = "Normal Size"
    End Select
    ' Display window state
    MsgBox "AutoCAD is now: " & CurrentState
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_WindowState()
    ;; This example reads and displays the current window state of the AutoCAD application.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Use the "WindowState" variable to determine the window state of AutoCAD
    (setq CurrentState (cond 
                           ((= (vla-get-WindowState acadObj) acMin) "Minimized")
                           ((= (vla-get-WindowState acadObj) acMax) "Maximized")
                           ((= (vla-get-WindowState acadObj) acNorm) "Normal Size")
                       ))
    ;; Display window state
    (alert (strcat "AutoCAD is now: " CurrentState))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 14:17
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.