Clipper On Line • Ver Tópico - Resolução de Tela
Mudar para estilo Clássico
Projeto MiniGui - Biblioteca visual para Harbour/xHarbour
Postar uma resposta

Resolução de Tela

12 Jul 2013 08:16

Bom dia!

Gostaria de saber se alguém do grupo pode me ajudar na seguinte dúvida: Estou desenvolvendo um sistema que usa a resolução de video de 800x600 (Windows XP), mas quando eu rodo o meu sistema em Windows 7 o video está com resolução de 1024x748 e com isto bagunça todoa meu layout de tela.
Tem como contornar este problema sem alterar as resoluções dos respectivos videos?

Desde já agradeço a atenção de todos,

[]'s
Paulo - Jacareí/SP

Resolução de Tela

12 Jul 2013 09:19

Oi Paulo, dê uma olhada neste código/exemplo:
Código:
/*
* MiniGUI Demo
*(c) 2004 Jacek Kubica <kubica@wssk.wroc.pl>
*
* This demo shows how to get width and height of the client area for a full-screen window
* on the primary display monitor, in pixels and get the coordinates of the portion of the screen
* not obscured by the system taskbar or by application desktop toolbars
*
* MINIGUI - Harbour Win32 GUI library
* Copyright 2002-03 Roberto Lopez <roblez@ciudad.com.ar>
*/

#include "minigui.ch"

Function Main
   DEFINE WINDOW Form_1 ;
      AT GetDesktopRealTop(),GetDesktopRealLeft() ;
      WIDTH GETDESKTOPREALWIDTH() ;
      HEIGHT GETDESKTOPREALHEIGHT() ;
      TITLE 'Hello World!' ;
      MAIN

   END WINDOW
   
   ACTIVATE WINDOW Form_1
Return

#pragma BEGINDUMP
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include "hbapi.h"
#include "hbvm.h"
#include "hbstack.h"
#include "hbapiitm.h"

HB_FUNC (GETDESKTOPREALTOP)
{
   RECT rect;
   int t ;
   SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 );
   t = rect.top ;

   hb_retni(t);

}
HB_FUNC (GETDESKTOPREALLEFT)
{
   RECT rect;
   int l ;
   SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 );
   l = rect.left ;

   hb_retni(l);

}

HB_FUNC (GETDESKTOPREALWIDTH)
{
   RECT rect;
   int w ;
   SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 );
   w = rect.right - rect.left ;

   hb_retni(w);

}

HB_FUNC (GETDESKTOPREALHEIGHT)
{
   RECT rect;
   int h ;
        SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 );
        h = rect.bottom - rect.top ;
   hb_retni(h);
}
Serve tanto para Extended como para HMG. Também você pode ler estes:

http://www.pctoledo.com.br/forum/viewtopic.php?p=41204#p41204 (dica importante)
http://www.pctoledo.com.br/forum/viewtopic.php?p=81460#p81460 (autojuste)

E por favor, faça sempre primeiro uma pesquisa avançada aqui no fórum. Você irá encontrar muitas vezes mais opções do que os colegas as vezes podem indicar.

Resolução de Tela

12 Jul 2013 09:50

Bom dia! Pablo.

Obrigado pela sua dica, vou testar aqui e depois te falo o resultado.

[]'s
Paulo - Jacareí/SP
Postar uma resposta