View previous topic :: View next topic |
Author |
Message |
stenlou
Joined: 24 Jun 2008 Posts: 30 Location: Germany and Denmark
|
Posted: Tue Jun 24, 2008 10:54 am Post subject: two monitors |
|
|
Is there a way to use two monitors with clearwin? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Jun 24, 2008 12:37 pm Post subject: |
|
|
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 |
|
|
stenlou
Joined: 24 Jun 2008 Posts: 30 Location: Germany and Denmark
|
Posted: Thu Jun 26, 2008 2:46 pm Post subject: Re: two monitors |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Jun 26, 2008 5:05 pm Post subject: |
|
|
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 |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Thu Jun 26, 2008 5:20 pm Post subject: |
|
|
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 |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Fri Jun 27, 2008 1:09 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Wed Jul 16, 2008 11:45 pm Post subject: Re: two monitors |
|
|
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
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? ). 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
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 |
|
|
|