现在的位置: 首页 > 综合 > 正文

如何获取Max视图的左上角的屏幕位置

2012年09月06日 ⁄ 综合 ⁄ 共 297字 ⁄ 字号 评论关闭

其实就是一个坐标转换 

Fn GetViewportRootPos = Mouse.ScreenPos - Mouse.Pos
GetViewportRootPos()

try(DestroyDialog TestFollowViewport)catch()
Rollout TestFollowViewport
"TestFollowViewport"
(
Timer theTimer interval:
100
on theTimer tick
do
(
SetDialogPos TestFollowViewport ( Mouse.ScreenPos
- Mouse.Pos)
)

)
CreateDialog TestFollowViewport

抱歉!评论已关闭.