Maggiro wrote:hola manuel:
tu "ya está solucionado" realmente si funciona!!!
# include "fivewin.ch"
Function W_Main_Info ()
Local oDatos, oSrv, oJob, i, sMensaje := ""
Local oLoc := CreateObject ( "wbemScripting.SwbemLocator" )
Local objWMI
Local oResolucion, nResoIni, nResoFin
TRY
objWMI := oLoc:ConnectServer () && Aquí esta la configuración del Sistema
CATCH
TRY
objWMI := oLoc:ConnectServer ( "192.168.2.20" ) && 0.0.0.0
MsgInfo ( "IP OK" )
CATCH
MsgInfo ( "Error. Validando el servidor" )
CLOSE ALL
Return Nil
END
END
oResolucion := objWMI:ExecQuery ( "Select * from Win32_DesktopMonitor" )
sMensaje += CRLF + "Resolución de Pantalla:" + CRLF
FOR Each oDatos in oResolucion
sMensaje += "Alto: " + cValToChar ( oDatos:ScreenHeight ) + " * " + ;
"Ancho: " + cValToChar ( oDatos:ScreenWidth ) + CRLF
// aqui usted hace el controle
nResoIni := cValToChar ( oDatos:ScreenHeight )
nResoFin := cValToChar ( oDatos:ScreenWidth )
NEXT
MsgInfo ( sMensaje, "Información" )
RETURN NIL
#include "Fivewin.ch"
#Include "dll.ch"
#Include "Struct.ch"
Function Main()
Local aAllRes := {}
aAllRes := AllRes()
if !empty( aAllRes )
XBrowse( aAllRes )
endif
Return nil
#define ENUM_CURRENT_SETTINGS -1
#define ENUM_REGISTRY_SETTINGS -2
Function AllRes()
Local aAllRes := {}
Local oDevmode
Local oModos
Local i
STRUCT oDevMode
MEMBER cDevName AS STRING LEN 32
MEMBER nSpecVer AS WORD
MEMBER nDrvVer AS WORD
MEMBER nSize AS WORD
MEMBER nDrvExtra AS WORD
MEMBER nFields AS DWORD
MEMBER nOrientat AS WORD
MEMBER nPaperSiz AS WORD
MEMBER nPaperLen AS WORD
MEMBER nPaperWid AS WORD
MEMBER nScale AS WORD
MEMBER nCopies AS WORD
MEMBER nDefSrc AS WORD
MEMBER nPrnQlty AS WORD
MEMBER nColor AS WORD
MEMBER nDuplex AS WORD
MEMBER nYResolut AS WORD
MEMBER nTTOpt AS WORD
MEMBER nCollate AS WORD
MEMBER cFormName AS STRING LEN 32
MEMBER nUnusePad AS WORD
MEMBER nBitsPPel AS DWORD
MEMBER nPelWidth AS DWORD
MEMBER nPelHeigh AS DWORD
MEMBER nDisFlags AS DWORD
MEMBER nDisFreq AS DWORD
ENDSTRUCT
oModos := oDevMode:cBuffer
i := 0
do while .T.
if (EnumDisplaySettings(0, i, @oModos ))
AAdd( aAllRes, { oDevMode:nPelWidth, oDevMode:nPelHeigh, ;
oDevMode:nBitsPPel, oDevMode:nDisFreq } )
i++
else
exit
endif
Enddo
//? Len( aAllRes )
Return aAllRes
DLL32 FUNCTION EnumDisplaySettings(lpszDeviceName AS DWORD, iModeNum AS DWORD, ;
@lpDevMode AS LPSTR) AS BOOL PASCAL FROM "EnumDisplaySettingsA" LIB "User32.dll"
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 10 guests