- Code: Select all Expand view
pVideo := GetSysMetrics(0)
IF( pVideo < 1024 ) .OR. ( pVideo > 1024 )
MsgInfo( "Melhor Resoluçao Para o Sistema: 1024 x 768 "+CRLF," Atenção... " )
ENDIF
Gracias, saludos.
pVideo := GetSysMetrics(0)
IF( pVideo < 1024 ) .OR. ( pVideo > 1024 )
MsgInfo( "Melhor Resoluçao Para o Sistema: 1024 x 768 "+CRLF," Atenção... " )
ENDIF
//-------------------------
nSCR1 := GetSysMetrics(0) // width
nSCR2 := GetSysMetrics(1) // height
ACTIVATE WINDOW oWind ;
MAXIMIZED ;
ON INIT ( IF( nSCR1 < 1024, _ResMessage(nSCR1, nSCR2), ),_ChkOwner( oWind,cFirst)); // 560,230
ON PAINT ( IF( xTEXT = "/NL", ,PalBmpDraw( hDC, 0,0, oBmp:hBitmap, oBmp:hPalette, nSCR1, nSCR2 )),;
PalBmpDraw( hDC, _UpDown(), _RightLeft(), oBMAP:hBitmap, oBMAP:hPalette,305,191 ),;
_ChkDemo(@nTimes));
VALID ( IIF( !lExitPgm, _ExitPgm( .T. ) , .F. ))
//-----------------------------------------------
Static Func _ResMessage( nScr1,nScr2 )
LOCAL SAYING
SAYING := "It appears that your screen resolution is "+str(nSCR1,4)+"x"+STR(nSCR2,4)+" and is below"+chr(10)
SAYING += "the minimum of 1024 x 768. This is not a critical error, however you will"+chr(10)
SAYING += "find some screens and forms in this application that will be too large to fit"+chr(10)
SAYING += "on your screen... just fair warning"+chr(10)
MsgInfo( saying )
RETURN(.T.)
#include "FiveWin.ch"
STATIC oWnd
//----------------------------------------------------------------//
FUNCTION Main()
LOCAL nSCR1, nSCR2
nSCR1 := GetSysMetrics(0) // width
nSCR2 := GetSysMetrics(1) // height
DEFINE WINDOW oWnd TITLE "GetSysMetrics test win 10"
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( IF( nSCR1 < 1024 .OR. nSCR1 > 1024, _ResMessage( nSCR1, nSCR2), ) )
RETURN NIL
//-----------------------------------------------
Static Function _ResMessage( nScr1, nScr2 )
LOCAL SAYING
SAYING := "It appears that your screen resolution is "+str(nSCR1,4)+"x"+STR(nSCR2,4)+" and is below"+chr(10)
SAYING += "the minimum of 1024 x 768. This is not a critical error, however you will"+chr(10)
SAYING += "find some screens and forms in this application that will be too large to fit"+chr(10)
SAYING += "on your screen... just fair warning"+chr(10)
MsgInfo( saying )
RETURN(.T.)
// Many thanks By Mister Rick Lipkin
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------//
FUNCTION Main()
LOCAL nSCR1, nSCR2
nSCR1 := GetSysMetrics(0) // width
nSCR2 := GetSysMetrics(1) // height
DEFINE WINDOW oWnd TITLE "GetSysMetrics test win 10"
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( IF( nSCR1 < 1024 .OR. nSCR1 > 1024, _ResMessage( nSCR1, nSCR2), ) )
RETURN NIL
//-----------------------------------------------
Static Function _ResMessage( nScr1,nScr2 )
MsgInfo( "Sua resolução de tela atual é: " + STR( nSCR1,4 ) + " x " + STR( nSCR2, 4 )+CRLF+ ;
"Para este aplicativo, a resolução ideal é: 1024 x 768. Isto não é um erro" +CRLF+ ;
"crítico, no entanto, você pode encontrar algumas telas e formulários" +CRLF+ ;
"neste aplicativo que será melhor visualizado em: 1024 x 768 (Vídeo)", ;
"PLENOIND: Sugestão de melhor resolução de tela..." )
RETURN(.T.)
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 66 guests