Two monitors, show different windows
Two monitors, show different windows
Hi fivewinners
I need to show some info in a second monitor, not to grab and place a window on mi 2nd monitor, but to work in the main one, and when need it show a window on the second one
Something like
Define Window .... of MONITOR1 algo asiii
or Activate Window on Paint GOTOMONITOR(2)
I can do mi work in mi main monitor, like a sale, and show photos, information on the second one, but controlled by me in the main one.
Any ideas.
From Chile
Adolfo
I need to show some info in a second monitor, not to grab and place a window on mi 2nd monitor, but to work in the main one, and when need it show a window on the second one
Something like
Define Window .... of MONITOR1 algo asiii
or Activate Window on Paint GOTOMONITOR(2)
I can do mi work in mi main monitor, like a sale, and show photos, information on the second one, but controlled by me in the main one.
Any ideas.
From Chile
Adolfo
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Two monitors, show different windows
There are different ways.
This is the simplest.
Another way
This is the simplest.
Code: Select all | Expand
DEFINE WINDOW oWnd
ACTIVATE WINDOW oWnd ON INIT WndCenterEx( oWnd:hWnd, 2 ) // 2 means second monitor
Code: Select all | Expand
oMonitor2 := FW_GetMonitor( 2 )
DEFINE WINDOW oWnd FROM oMonitor2:Row(200), oMonitor2:Col(100) TO ;
oMonitor2:Row(600),oMonitor2:Col(800) PIXEL
ACTIVATE WINDOW oWnd
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Two monitors, show different windows
Thanks a lot NAGES
Going to try inmediately
Going to try inmediately
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Re: Two monitors, show different windows
Nages
I get this error
Time from start: 0 hours 0 mins 7 secs
Error occurred at: 07/10/2024, 09:57:27
Error description: Error BASE/1004 Message not found: TMONITOR:NROW
Args:
[ 1] = O TMONITOR
Stack Calls
===========
Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TMONITOR:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TMONITOR:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TMONITOR:NROW( 0 )
Called from: .\source\function\getsysin.prg => (b)TMONITOR( 481 )
Called from: .\source\function\getsysin.prg => TMONITOR:ROW( 0 )
Called from
Local oMonitor2 := FW_GetMonitor( 2 )
DEFINE WINDOW oWnd2 FROM oMonitor2:Row(50), oMonitor2:Col(10) TO ;
oMonitor2:Row(700),oMonitor2:Col(900) PIXEL NOSYSMENU NOCAPTION
I'm using FWH 08/2024 MSVC
I get this error
Time from start: 0 hours 0 mins 7 secs
Error occurred at: 07/10/2024, 09:57:27
Error description: Error BASE/1004 Message not found: TMONITOR:NROW
Args:
[ 1] = O TMONITOR
Stack Calls
===========
Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TMONITOR:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TMONITOR:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TMONITOR:NROW( 0 )
Called from: .\source\function\getsysin.prg => (b)TMONITOR( 481 )
Called from: .\source\function\getsysin.prg => TMONITOR:ROW( 0 )
Called from
Local oMonitor2 := FW_GetMonitor( 2 )
DEFINE WINDOW oWnd2 FROM oMonitor2:Row(50), oMonitor2:Col(10) TO ;
oMonitor2:Row(700),oMonitor2:Col(900) PIXEL NOSYSMENU NOCAPTION
I'm using FWH 08/2024 MSVC
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Two monitors, show different windows
Not :nRow()
Use :Row()
Pease just copy and paste this code and try.
This should work 100%.
After that you change the values as you like
Use :Row()
Pease just copy and paste this code and try.
Code: Select all | Expand
oMonitor2 := FW_GetMonitor( 2 )
DEFINE WINDOW oWnd FROM oMonitor2:Row(200), oMonitor2:Col(100) TO ;
oMonitor2:Row(600),oMonitor2:Col(800) PIXEL
ACTIVATE WINDOW oWnd
After that you change the values as you like
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Two monitors, show different windows
NAGES
Called from...
Local oMonitor2 := FW_GetMonitor( 2 )
DEFINE WINDOW oWnd2 FROM oMonitor2:Row(50), oMonitor2:Col(10) TO ;
oMonitor2:Row(700),oMonitor2:Col(900) PIXEL NOSYSMENU NOCAPTION
Thats how I use it... ther is no NROW in mi code
Called from...
Local oMonitor2 := FW_GetMonitor( 2 )
DEFINE WINDOW oWnd2 FROM oMonitor2:Row(50), oMonitor2:Col(10) TO ;
oMonitor2:Row(700),oMonitor2:Col(900) PIXEL NOSYSMENU NOCAPTION
Thats how I use it... ther is no NROW in mi code
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Re: Two monitors, show different windows
Full code of my function
Function MuestraFoto(cTexto)
Local oBrush2
Local oWnd2
Local oMonitor2 := FW_GetMonitor( 2 )
DEFINE FONT oBold NAME 'Tahoma' SIZE 0, -320 BOLD
DEFINE BRUSH oBRush2 RESOURCE "LAYER" TILED
DEFINE WINDOW oWnd2 FROM oMonitor2:Row(50), oMonitor2:Col(10) TO ;
oMonitor2:Row(600),oMonitor2:Col(800) PIXEL NOSYSMENU NOCAPTION Brush oBrush2
@ nFil,nCol BITMAP oBmp FILENAME "test.png" OF oWnd2 NOBORDER PIXEL SIZE 800,800 ADJUST
oBmp:bPainted = { || SetBkMode( oBmp:hDC, 1 ),;
SetTextColor( obmp:hDC, CLR_WHITE ),;
oBold:Activate( oBmp:hDC ),;
TextOut( oBmp:hDC, 170, 30, cTexto ),;
oBold:DeActivate(oBmp:hDC) }
ACTIVATE WINDOW oWnd2
Return Nil
Function MuestraFoto(cTexto)
Local oBrush2
Local oWnd2
Local oMonitor2 := FW_GetMonitor( 2 )
DEFINE FONT oBold NAME 'Tahoma' SIZE 0, -320 BOLD
DEFINE BRUSH oBRush2 RESOURCE "LAYER" TILED
DEFINE WINDOW oWnd2 FROM oMonitor2:Row(50), oMonitor2:Col(10) TO ;
oMonitor2:Row(600),oMonitor2:Col(800) PIXEL NOSYSMENU NOCAPTION Brush oBrush2
@ nFil,nCol BITMAP oBmp FILENAME "test.png" OF oWnd2 NOBORDER PIXEL SIZE 800,800 ADJUST
oBmp:bPainted = { || SetBkMode( oBmp:hDC, 1 ),;
SetTextColor( obmp:hDC, CLR_WHITE ),;
oBold:Activate( oBmp:hDC ),;
TextOut( oBmp:hDC, 170, 30, cTexto ),;
oBold:DeActivate(oBmp:hDC) }
ACTIVATE WINDOW oWnd2
Return Nil
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Two monitors, show different windows
I am extremely sorry.
The error is due to a bug in our TMonitor class.
And also thanks for bringing it to our notice.
Can you please apply the fix I am going to provide here and try it again?
\fwh\source\function\getsysin.prg
Please locate these two lines: (481,482)
Please change them as:
I tested with this change and it works.
Can you help us by implementing this fix and testing again?
The error is due to a bug in our TMonitor class.
And also thanks for bringing it to our notice.
Can you please apply the fix I am going to provide here and try it again?
\fwh\source\function\getsysin.prg
Please locate these two lines: (481,482)
Code: Select all | Expand
METHOD Row( r ) INLINE ( ::nRow + r )
METHOD Col( c ) INLINE ( ::nCol + c )
Code: Select all | Expand
METHOD Row( r ) INLINE ( ::nTop + r )
METHOD Col( c ) INLINE ( ::nLeft + c )
Can you help us by implementing this fix and testing again?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Two monitors, show different windows
Thanks Nages...
Works with no problems.
Thanks again
Works with no problems.
Thanks again
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Two monitors, show different windows
Please try this alternative approach also.
This may be simpler to code:
Your feedback helps us.
This may be simpler to code:
Code: Select all | Expand
local oMonitor2 := FW_GetMonitor( 2 )
local oWnd2
DEFINE WINDOW oWnd2 FROM 50,10 TO 600,800 PIXEL
// create your controls
ACTIVATE WINDOW oWnd2 ON INIT oMonitor2:Move( oWnd2 )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Two monitors, show different windows
From the next version :
Code: Select all | Expand
ACTIVATE WINDOW [<clauses,...] IN nMonitor/oMonitor
ACTIVATE DIALOG [<clauses,...] IN oWnd/nMonitor/oMonitor
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India