;;原恢复屏幕菜单至合适宽度，根据分辨率自动调整 Writen by eachy
;;MODIFY BY 龙龙仔(LUCAS)
(defun C:ScrnMenuReset (/ ORG_POSITION_LST SCREEN CU_PROFILES)
  (if ;;(and (> (atof (getvar "acadver")) 15.0)
      (= (getenv "ScreenMenu") "1")
    ;;)
    (progn
      (setq SCREEN '(1024 768))  ;请查看看自己屏幕分辨率
      (setq ORG_POSITION_LST
      (strcat (rtos (- (car SCREEN) 86) 2 0)  ;参数屏幕菜单宽度
       " 95 "                          ;参数屏幕菜单长度
       (rtos (- (car SCREEN) 16) 2 0)  ;参数屏幕菜单宽度
       " "
       (rtos (- (last SCREEN) 10) 2 0);参数屏幕菜单长度
      )
      )
      (setq CU_PROFILES
      (strcat "HKEY_CURRENT_USER\\"
       (vlax-product-key)
       "\\PROFILES\\"
       (vla-get-activeprofile
         (vla-get-profiles
    (vla-get-preferences (vlax-get-acad-object))
         )
       )
       "\\DRAWING WINDOW\\"
      )
      )
      (setenv "ScreenMenu" "0")
      (if (vl-registry-read CU_PROFILES "SCREENMENU.POSITION")
 (progn
   (vl-registry-write
     CU_PROFILES
     "ScreenMenu.Position"
     ORG_POSITION_LST
   )
   (vl-registry-write CU_PROFILES "ScreenMenu.Style" 4)
 )
      )
      (setenv "ScreenMenu" "1")
    )
  )
  (princ)
)