指定应用程序或文档窗口的状态。 支持的平台:仅窗口 属性值只读:不 类型:枚举acWindowState
言论没有额外的评论。 例子工 务 局: 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 Visual 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-1-8 19:08
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.