Página 1 de 1

Tem como definir forms sem usar pixels?

Enviado: 29 Dez 2017 14:18
por JoséQuintas
Tem como definir um tamanho de form sem precisar de pixels?
É que vai ser chato encontrar um padrão.

Aqui tenho 3 monitores:

1600 x 900
1920 x 1080
3840 x 2160

e no cliente pode ter muitas outras

Tem alguma forma de definir, que não seja maximizado, ou não dependa de pixels?

Tem como definir forms sem usar pixels?

Enviado: 30 Dez 2017 00:11
por MSDN
Tem que ser usando pixel, é bem simples, use o set autoadjust e quando criar uma janela, utilize coordenadas baseado na altura e largura máxima da tela.

Tem como definir forms sem usar pixels?

Enviado: 30 Dez 2017 14:25
por sygecom
Zé,
Aqui levamos como padrão 1024x768 na hora de fazer as telas e, na hwgui temos umas propriedades: Anchor que redimenciona a tela conforme o usuário aumenta ou diminui a tela que está.
ORing this bit values:
ANCHOR_TOPLEFT 0 // Anchors control to the top and left borders of the container and does not change the distance between the top and left borders. (Default)
ANCHOR_TOPABS 1 // Anchors control to top border of container and does not change the distance between the top border.
ANCHOR_LEFTABS 2 // Anchors control to left border of container and does not change the distance between the left border.
ANCHOR_BOTTOMABS 4 // Anchors control to bottom border of container and does not change the distance between the bottom border.
ANCHOR_RIGHTABS 8 // Anchors control to right border of container and does not change the distance between the right border.
ANCHOR_TOPREL 16 // Anchors control to top border of container and maintains relative distance between the top border.
ANCHOR_LEFTREL 32 // Anchors control to left border of container and maintains relative distance between the left border.
ANCHOR_BOTTOMREL 64 // Anchors control to bottom border of container and maintains relative distance between the bottom border.
ANCHOR_RIGHTREL 128 // Anchors control to right border of container and maintains relative distance between the right border.
ANCHOR_HORFIX 256 // Anchors center of control relative to left and right borders but remains fixed in size.
ANCHOR_VERTFIX 512 // Anchors center of control relative to top and bottom borders but remains fixed in size.

Tem como definir forms sem usar pixels?

Enviado: 16 Mar 2018 17:24
por samuel kalan
oi sr. quintas sou o mesmo samuel do gurpo minigui d facebook lembra?
entrei hoje para este fórum, nem sabia que eles existiam enfim...
se ainda for tempo, a respeito de sua pergunta:


*----------------------------------------------------------------------------
* limitar tam da janela
*----------------------------------------------------------------------------
Function TamJan()
#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);
}
#pragma ENDDUMP

aolique em uma função separada do seu progrma principal, isso se vc não usa ide, se uar, bom ai não confio que funcione.
abraços

Tem como definir forms sem usar pixels?

Enviado: 16 Mar 2018 21:12
por JoséQuintas
Lembro sim.

Dica: pra código fonte, é interessante formatar com as tags pra isso.
[ code ] e [ /code ], sem os espaços
fica assim

Código: Selecionar todos

FUNCTION Main()
   RETURN NIL
Provavelmente vão editar seu post e acrescentar a formatação.