Author Topic: stretch window across two monitors  (Read 3329 times)

0 Members and 1 Guest are viewing this topic.

EddieFromDc

  • Newt
  • Posts: 34
stretch window across two monitors
« on: January 27, 2011, 12:42:01 PM »
Hello,

I have two monitors. Is there a way thru vlisp
to my toggle my screensize between 1 or 2
monitors. I have to manualyy drag the window
across to the upper right hand corner of my
second monitor.

I tried the varaible "screesize" but it seems to
be a read only.

Thanks in advance.

Swift

  • Swamp Rat
  • Posts: 596
Re: stretch window across two monitors
« Reply #1 on: January 27, 2011, 12:45:26 PM »
on my systems that is a windows setting, about allowing windows to multi-span screens, through the nvidia control panel... not sure how you get at it with vlisp

T.Willey

  • Needs a day job
  • Posts: 5251
Re: stretch window across two monitors
« Reply #2 on: January 27, 2011, 12:52:25 PM »
You can do it with lisp ( ActiveX ), adjust the size of the whole Acad program window, but I don't know yet how to get the true size of all screens attached, and I don't see how to move the acad program window where you want it yet.  One would adjust the ' Height ' and ' Width ' properties of the Acad object ' (vlax-get-Acad-Object) '.  You might also have to change the ' WindowState ' property.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

M-dub

  • Guest
Re: stretch window across two monitors
« Reply #3 on: January 27, 2011, 01:35:04 PM »
What if you stretch it across both screens manually once, then you can just double click on the title bar to toggle the window between maximized and 'restored'.

EddieFromDc

  • Newt
  • Posts: 34
Re: stretch window across two monitors
« Reply #4 on: January 27, 2011, 02:10:31 PM »
Thank you guys for the tips and suggestions..I kinda followed
Tim's lead. After doing more research I've come up with a solution
that I think will work for me.

I "dump" the current document... First used one monitor, recorder
the properties.  Then stretch into two monitors then "dump" and
recorder again the properties.

Dump:
(vlax-dump-object (vlax-get-acad-object) T)

Here is my lisp routines. If anyone can massage/correct it,
I will be most appreciative.

(defun c:OneMonitor ()
(vl-load-com)
(setq acadapp (vlax-get-acad-object))
(vlax-put-property acadapp "Height" 984)
(vlax-put-property acadapp "Width" 1696)
(vlax-put-property acadapp "WindowLeft" -8)
(vlax-put-property acadapp "WindowState" 3)
(vlax-put-property acadapp "WindowTop" -8)
(vlax-release-object acadapp)
)

(defun c:TwoMonitors ()
(vl-load-com)
(setq acadapp (vlax-get-acad-object))
(vlax-put-property acadapp "Height" 984)
(vlax-put-property acadapp "Width" 3372)
(vlax-put-property acadapp "WindowLeft" -9)
(vlax-put-property acadapp "WindowState" 1)
(vlax-put-property acadapp "WindowTop" 0)
(vlax-release-object acadapp)
)