forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

two monitors

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
stenlou



Joined: 24 Jun 2008
Posts: 30
Location: Germany and Denmark

PostPosted: Tue Jun 24, 2008 10:54 am    Post subject: two monitors Reply with quote

Is there a way to use two monitors with clearwin?
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Tue Jun 24, 2008 12:37 pm    Post subject: Reply with quote

Can you explain what you mean.

I use two monitors all the time but I have no need to relate this to any ClearWin+ settings/code.
Back to top
View user's profile Send private message AIM Address
stenlou



Joined: 24 Jun 2008
Posts: 30
Location: Germany and Denmark

PostPosted: Thu Jun 26, 2008 2:46 pm    Post subject: Re: two monitors Reply with quote

stenlou wrote:
Is there a way to use two monitors with clearwin?


I would like to e.g start one window on one monitor and an other on an other monitor or scale a clearwin window to fill both monitors.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Thu Jun 26, 2008 5:05 pm    Post subject: Reply with quote

When you use a dual monitor graphics card as I do then this simply doubles the screen width. If you set the x-positions of a Window large enough then it will appear on the right hand monitor. Then you could maximise it and it will fill the right hand monitor.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Thu Jun 26, 2008 5:20 pm    Post subject: Reply with quote

First read these articles on MSDN

www.microsoft.com/msj/0697/monitor/monitor.aspx
msdn.microsoft.com/en-us/library/ms533266(VS.85).aspx
msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx


They might help.

The program to work out the virtual position of your second monitor looks like this in Fortran. You can probably then use the offsets with move_window@ to place your second screen.

Code:

      winapp
      include <windows.ins>
      integer*4 SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN, SM_CXVIRTUALSCREEN,  &
                SM_CYVIRTUALSCREEN, SM_CMONITORS, SM_XVIRTUALSCREEN
      SM_YVIRTUALSCREEN = 77
      SM_CXVIRTUALSCREEN = 78
      SM_CYVIRTUALSCREEN = 79
      SM_CMONITORS = 80
      print *,GetSystemMetrics(SM_CMONITORS)
      print *,GetSystemMetrics(SM_SAMEDISPLAYFORMAT)
      print *,GetSystemMetrics(SM_XVIRTUALSCREEN)
      print *,GetSystemMetrics(SM_YVIRTUALSCREEN)
      print *,GetSystemMetrics(SM_CXVIRTUALSCREEN)
      print *,GetSystemMetrics(SM_CYVIRTUALSCREEN)

      end


Regards

Ian
Back to top
View user's profile Send private message Send e-mail
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Fri Jun 27, 2008 1:09 pm    Post subject: Reply with quote

I ran the above program on a twin monitor computer and it gave the following results:
2
1920
1920
0
3200
1200

The deliberate error was to not define and assign a value to SM_SAMEDISPLAYFORMAT
which should have been integer*4 & value 81. But ignoring that, the next program places windows on each monitor, and even put them where expected. Note the Silverfrost <windows.ins> does not seem to have all the parameters for GetSystemMetrics defined.

Code:
      winapp
      include <windows.ins>
      ix1 = 200
      iy1 = 100
      i=winio@('%ww%ca[Window1]%sz%lw&',ix1,iy1,ihandle1)
      i=winio@('%sp',0,0)
      ix2 = 400
      iy2 = 100
      i=winio@('%ww%ca[Window2]%sz&',ix2,iy2)
      i=winio@('%sp',1920,10)
      end


Regards

Ian
Back to top
View user's profile Send private message Send e-mail
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Wed Jul 16, 2008 11:45 pm    Post subject: Re: two monitors Reply with quote

stenlou wrote:
Is there a way to use two monitors with clearwin?


Multimonitors are a nice feature, but sometimes they are a hassle when you will remove additional monitors or just switch them off.

This is because some your applications may continue to open windows in nonexisting areas. You may forget where you opened and saved windows and will think that something happen with your application. Just today I've spent a whole night pulling my last hairs and did not find why the window does not open. In the morning I realized what was the reason. This was not a first case by the way Sad

Similar story also happened when I used SDBG on the second monitor and saved all its windows positions there. Several weeks later I've spent hours trying everything to open SDBG and thinking that something wrong was with FTN95 compiler (we always think this way, right? Very Happy ). The SDBG though needs a fix, it does not automatically appear in main monitor window even if the second monitor does not exist in the system.

For all who use multimonitors - just do not forget to implement all the precautions for such cases using screen sizes from IanLambley respond.
Main screen parameters can be obtained from here

iSysXRES = GetSystemMetrics(SM_CXSCREEN)
iSysYRES = GetSystemMetrics(SM_CYSCREEN)

Lost another half a day but I did that today finally. Now all kinds of warings jump into my face from all the screens with wild sounds and animations Very Happy

Would be nice though if someone translated all these test into FTN95 or at least checked them in SCC

http://www.microsoft.com/msj/0697/monitor/monitortextfigs.htm#fig10
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group