WindowMovedOrResized 事件 (ActiveX)
在应用程序或绘图窗口移动或调整大小后立即触发。 支持的平台:仅限 Windows 签名VBA: object.WindowMovedOrResized(HWNDFrame, bMoved) 言论在实现与应用程序或文档窗口一起跟踪的工具栏或无模式对话框时,此事件非常有用。VB 或 ObjectARX 应用程序可以使用 HWNDFrame 参数获取窗口的坐标,将这些坐标转换为屏幕坐标或父坐标,并使用此信息定位其他窗口。 显示模式对话框时不会触发任何事件。 例子VBA: Private Sub AcadDocument_WindowMovedOrResized(ByVal HWNDFrame As LONG_PTR, ByVal bMoved As Boolean) ' This example intercepts a drawing WindowMovedOrResized event. ' ' This event is triggered when the drawing window is moved or resized ' ' To trigger this example event: Move or resize the drawing window Dim CurrentState As String ' Use the "bmoved" variable to determine if we moved or sized the drawing window CurrentState = IIf(bMoved, "Moving", "Sizing") MsgBox "The drawing window appearance was changed by: " & CurrentState End Sub 可视化 LISP: Not available |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 22:29
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.