Page 1 of 1
Second monitor
Posted: Tue Oct 16, 2018 6:25 am
by skiman
Hi,
Anyone who has an elegant solution for the following?
Point of Sales system with two monitors.
When the salesman is registering the sale, some parts/objects of the screen should be shown on the second monitor.
- List of the products that are scanned.
- Display of the payment method: total amount, cash, credit card, ...
Problems encountered:
- Focus may not change.
- Autorefresh of the popup on the second screen.
- Closing of the popup on second screen.
Re: Second monitor
Posted: Mon Nov 18, 2019 2:31 am
by PedroAlex
Hi Chris,
Have you found a solution to this problem?
Appdesktop only controls 1 screen! right?
Now the POS brings a second screen.
I need to control this second screen.
any tips would be grateful.
regards
Re: Second monitor
Posted: Mon Nov 18, 2019 3:27 am
by MIGUELON
Hi Chris and Pedro, my software is also for point of sale with two screens
The second screen gives me the information of the items I sell and the total
It also acts as an advertising viewer reproducing images.
To help you I pass the sources of the program that works for me
Regards
Michael
Public lVisorActivo:=.f.
if ! M->lVisorActivo
M->lVisorActivo:=.t.
oVisGra:=Thread():new()
oVisGra:setPriority(PRIORITY_LOWEST)
oVisGra:Start({||VisorGrafico()})
endif
**********************
procedure VisorGrafico
**********************
local GetList:={}, GetOptions,oPhoto1,oGrupoBotones,oPhoto,oPresentacion
local nValor := 1,cTexto:=""
local cCarpeta:=LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Carpeta fotos tienda","c:\")
local cCarpetaCompart:=LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Carpeta fotos compartida","c:\")
local aFotos,aFotos2,we
local nPosicionHVG:=val(LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Posicion Horizontal",1000))
local nPosicionVVG:=val(LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Posicion Vertical",100))
local nAlturaVG:=val(LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Altura ventana",24))
local nAnchuraVG:=val(LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Anchura Ventana",100))
local nCuentaFoto:=0,nNumeroDeFotos2
local nNumeroDeFotos:=adir(cCarpetaCompart+"\*.JPG"),oVisorLinea11
local cLinea1:=padr(alltrim(M->Pa_Ve070)+" "+alltrim(M->Pa_Ve071),M->Pa_Ge026)
local cLinea2:=padr(IIF(M->Pa_Ge008="C","Gracies per la seva visita.","Gracias por su visita.")+" "+DTOC(DATE()),M->Pa_Ge026),cLinea3:=""
if nNumeroDeFotos>0
aFotos:= Array(nNumeroDeFotos )
adir(cCarpetaCompart+"\*.JPG",aFotos)
for we=1 to nNumeroDeFotos
aFotos[we]:=cCarpetaCompart+"\"+aFotos[we]
next
else
mensaje({"No encuentro las fotos en: ",cCarpetaCompart+"\*.JPG"},30)
return
endif
nNumeroDeFotos2:=adir(cCarpeta+"\*.JPG")
if nNumeroDeFotos2>0
aFotos2:= Array(nNumeroDeFotos2 )
adir(cCarpeta+"\*.JPG",aFotos2)
for we=1 to nNumeroDeFotos2
aadd(aFotos,cCarpeta+"\"+aFotos2[we])
next
endif
nNumeroDeFotos+=nNumeroDeFotos2
asort(aFotos)
if nAlturaVG=0
nAlturaVG:=24
endif
if nAnchuraVG=0
nAnchuraVG:=100
endif
@ 0,0 DCSAY cLinea1 ;
SAYFONT "24.Verdana Bold" sayleft ;
saysize nAnchuraVG,2.5 SAYCOLOR GRA_CLR_GREEN, GRA_CLR_BLACK ;
sayobject oVisorLinea01
@ 2,0 DCSAY cLinea2;
SAYFONT "24.Verdana Bold" sayleft ;
saysize nAnchuraVG,2.5 SAYCOLOR GRA_CLR_GREEN, GRA_CLR_BLACK ;
sayobject oVisorLinea02
@ 5,0 DCSTATIC TYPE XBPSTATIC_TYPE_RAISEDBOX SIZE nAnchuraVG,nAlturaVG;
OBJECT oPhoto1
DCBITMAP cCarpeta PARENT oPhoto1 AUTOSCALE OBJECT oPhoto CENTER
DCGETOPTIONS ;
NOTITLEBAR
DCREAD GUI ;
FIT ;
OPTIONS GETOPTIONS ;
EVAL({|o|o:setPos({nPosicionHVG,nPosicionVVG}),MuestraFotos(oPhoto1,aFotos,nNumeroDeFotos,o,nPosicionHVG,nPosicionVVG)})
return
***************************
procedure MuestraFotos(oPhoto1,aFotos,nNumeroDeFotos,oPantalla,nPosicionHVG,nPosicionVVG)
***************************
local nCuentaFoto:=0
local nFrecuenciaVG:=val(LeeIni(M->PATHPARAMETROSLOCAL+SILPERFUM_INI,"VISOR_GRA","Frecuencia VisorGrafico",600))
if nFrecuenciaVG=0
nFrecuenciaVG:=400
endif
DO WHILE M->lVisorActivo
if nCuentaFoto+1>nNumeroDeFotos
nCuentaFoto:=1
else
nCuentaFoto++
endif
oPantalla:SetFrameState(XBPDLG_FRAMESTAT_NORMALIZED)
oPantalla:setPos({nPosicionHVG,nPosicionVVG})
DC_BitMapDraw(oPhoto1,aFotos[nCuentaFoto])
Sleep(nFrecuenciaVG)
ENDDO
return
Re: Second monitor
Posted: Mon Nov 18, 2019 3:47 am
by skiman
Hi,
As you can see in the code of Miguelon, the screen size is the sum of both monitors. If your first monitor has 1000 pixels horizontally, you can put something on the second monitor at position 1001.
In the code of Miguelon this is done by the setpos in the eval clause.
Re: Second monitor
Posted: Mon Nov 18, 2019 7:47 am
by PedroAlex
Miguelon and Chris.
many thanks.
I will try that tips.
Best Regards.