Relacion entre coordenadas pixeles, pulgadas

Post Reply
User avatar
jvtecheto
Posts: 357
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Relacion entre coordenadas pixeles, pulgadas

Post by jvtecheto »

Buenas tardes:

Reconozco que me gusta mas usar recursos en mis pequeños programas/pruebas, pero para ver como funciona una clase, etc he visto que muchos
de ustedes utilizan coordenadas @ fila, col , y a mi parecer con gran exito, el caso es que no me aclaro, intento explicar.

Codigo basico.

Code: Select all

local oDlg, oFld, oSay
    
   DEFINE DIALOG oDlg SIZE 400, 300
 
   @ 1, 1 FOLDER oFld OF oDlg SIZE 192, 130 // Ancho , alto
   @ 2, 1 SAY oSay PROMPT "Fivewin 19.05 last version" OF oFld:aDialogs[ 1 ] SIZE 80, 20 ADJUST
      
   ACTIVATE DIALOG oDlg CENTERED 
 
la imagen es esta

https://ibb.co/fYs3nhK

Entonces segun entiendo cuando hacemos size , el tamaño siempre son pixeles, en el DIALOG podriamos darles la resolucion del monitor que en mi
caso es 1920x1080, creo aprox. pero luego dentro del dialogo, si le hemos dado 400x300 .
¿Ahi como se que el folder que me cabe es aprox. 192 , 130, ya que si intento hacerlo mas grande no cabe.?
¿Y como se que cuando le coloco el SAY aproximadamente en @ 8,1 esta al final del folder ?
¿Y el tamaño 80x20 del say como se que si no le doy 80 no cabe la frase?

Me explico, ¿no?

Gracias , de verdad.

Jose.
Fwh 19.06 32 bits + Harbour 3.2dev(r2011030937)+ Borland 7.4 + FivEdit
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Relacion entre coordenadas pixeles, pulgadas

Post by nageswaragunupudi »

Define the dialog with TRUEPIXEL clause and define all controls in Pixels.
You clearly know where is each control is placed.

Code: Select all

DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL

@  10,20 SAY "Top" SIZE 100,24 PIXEL OF oDlg
@ 366,20 SAY "Bottom" SIZE 100,24 PIXEL OF oDlg

ACTIVATE DIALOG oDlg CENTERED
 
Regards

G. N. Rao.
Hyderabad, India
Compuin
Posts: 1017
Joined: Tue Dec 28, 2010 1:29 pm

Re: Relacion entre coordenadas pixeles, pulgadas

Post by Compuin »

nageswaragunupudi wrote:Define the dialog with TRUEPIXEL clause and define all controls in Pixels.
You clearly know where is each control is placed.

Code: Select all

DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL

@  10,20 SAY "Top" SIZE 100,24 PIXEL OF oDlg
@ 366,20 SAY "Bottom" SIZE 100,24 PIXEL OF oDlg

ACTIVATE DIALOG oDlg CENTERED
 

Hello, silly question

When you set any dialog in design mode....whas does any point represent on it ? It is the pixel position ?
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Relacion entre coordenadas pixeles, pulgadas

Post by nageswaragunupudi »

When you set any dialog in design mode .... whas does any point represent on it? It is the pixel position?
Pixels
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Relacion entre coordenadas pixeles, pulgadas

Post by nageswaragunupudi »

For converting pixels to inches/mm we can use these functions. The results vary on the basis of physical size of monitor.

ScrResolution() --> { nWidth, nHeight } in Pixels
ScreenHeightMM() --> Screen height in Millimeters (/25.4 --> inches)
ScreenWidthMM() --> Screen width in Millimeters (/25.4 --> inches)
ScreenSize( [lInches] ) --> Screen Diagonal size. MM or Inches

Eg:
If we are using 21" monitor, ScreenSize( .t. ) --> 21
Regards

G. N. Rao.
Hyderabad, India
Post Reply