This is Display Scroll Bar Reactor
(defun c:SB () (c:SCROLLBARS))
(defun c:SCROLLBARS (/ oDispPrefs)
(vl-load-com)
(princ "\rSCROLL BARS: ")
(if (= :vlax-true
(vla-get-displayscrollbars
(setq oDispPrefs
(vla-get-display
(vla-get-preferences
(vlax-get-acad-object))))))
(progn (vla-put-displayscrollbars oDispPrefs :vlax-false)
(princ "OFF "))
(progn (vla-put-displayscrollbars oDispPrefs :vlax-true)
(princ "ON ")))
(princ))

To Turning scroll bars OFF when you open AutoCad jast add this lisp to Startup Suite (via Appload command)

(defun c:SB () (c:SCROLLBARS))
(defun c:SCROLLBARS (/ oDispPrefs)
(vl-load-com)
(princ "\rSCROLL BARS: ")
(if (= :vlax-true
(vla-get-displayscrollbars
(setq oDispPrefs
(vla-get-display
(vla-get-preferences
(vlax-get-acad-object))))))
(progn (vla-put-displayscrollbars oDispPrefs :vlax-false)
(princ "OFF "))
(progn (vla-put-displayscrollbars oDispPrefs :vlax-false)
(princ "OFF ")))
(princ))

Advertisements