Oi Paulo, dê uma olhada neste código/exemplo:
/*
* 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.