切换超链接光标和快捷菜单的显示。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性的初始值为。True 启用此属性后,每当光标位于包含超链接的对象上时,用户都会看到一个小位图(十字准线的正下方和右侧)。禁用该属性时,将不会显示此位图。 例子工 务 局: Sub Example_HyperlinkDisplayCursor() ' This example reads and modifies the preference value that controls ' the display of the hyperlink cursor and shortcut menu. ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadPreferencesUser Dim originalValue As Variant, newValue As Variant ' Get the user preferences object Set ACADPref = ThisDrawing.Application.preferences.User ' Read and display the original value originalValue = ACADPref.HyperlinkDisplayCursor MsgBox "The HyperlinkDisplayCursor preference is set to: " & originalValue ' Modify the HyperlinkDisplayCursor preference by toggling the value ACADPref.HyperlinkDisplayCursor = Not (ACADPref.HyperlinkDisplayCursor) newValue = ACADPref.HyperlinkDisplayCursor MsgBox "The HyperlinkDisplayCursor preference has been set to: " & newValue ' Reset the preference back to its original value ' ' * Note: Comment out this last section to leave the change to ' this preference in effect ACADPref.HyperlinkDisplayCursor = originalValue MsgBox "The HyperlinkDisplayCursor preference was reset back to: " & originalValue End Sub Visual LISP: (vl-load-com) (defun c:Example_HyperlinkDisplayCursor() ;; This example reads and modifies the preference value that controls ;; the display of the hyperlink cursor and shortcut menu. ;; When finished, this example resets the preference value back to ;; its original value. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Read and display the original value (setq originalValue (vla-get-HyperlinkDisplayCursor (vla-get-User preferences))) (alert (strcat "The HyperlinkDisplayCursor preference is set to: " (if (= originalValue :vlax-true) "True" "False"))) ;; Modify the HyperlinkDisplayCursor preference by toggling the value (vla-put-HyperlinkDisplayCursor (vla-get-User preferences) (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (setq newValue (vla-get-HyperlinkDisplayCursor (vla-get-User preferences))) (alert (strcat "The HyperlinkDisplayCursor preference has been set to: " (if (= newValue :vlax-true) "True" "False"))) ;; Reset the preference back to its original value ;; ;; * Note: Comment out this last section to leave the change to ;; this preference in effect (vla-put-HyperlinkDisplayCursor (vla-get-User preferences) originalValue) (alert (strcat "The HyperlinkDisplayCursor preference was reset back to: " (if (= originalValue :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:43
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.