Re: About align center controls on a form
Posted: Sun Apr 05, 2009 2:21 am
Translated by Google,
Thanks Alex for sharing the code, but sorry I am unable to understand the operation.
gu_hk: = (0.8 * GetDesktopWidth ()) / (0.8 * 800)
gu_vk: = (0.8 * GetDesktopHeight ()) / (0.8 * 600)
in this code, 800 and 600 refers to my screen resolution (which I planned), or is the screen resolution on which to implement the program (the client), do the following tests, work at a resolution of 1280 * 800, if I run the program for that resolution and I do not change the variables gu_hk and gu_vk these values, the result is not desired, then I have to change the value of variables gu_hk := 1280 and gu_vk := 800, I run and everything goes well, the question is how could "automate" the example for this definition is made automatically so that no matter which resolution has everything to work correctly.
Thanks
Greetings
Javier
Spanish,
Gracias por compartir el código Alex, pero lo siento no soy capaz de entender el funcionamiento.
gu_hk := (0.8 * GetDesktopWidth() ) / (0.8 * 800)
gu_vk := (0.8 * GetDesktopHeight()) / (0.8 * 600)
en este código, 800 y 600 se refiere a mi resolución de pantalla (en donde estoy programando), o es la resolución de pantalla sobre la cual se ejecutará el programa (el cliente), hago las siguientes pruebas, trabajo a una resolución de 1280 * 800, si ejecuto el programa a esa resolución y no hago el cambio las variables gu_hk y gu_vk a esos valores, el resultado no es el deseado, entonces tengo que cambiar el valor de las variables gu_hk := 1280 y gu_vk := 800 y ejecuto y todo va bien, el tema es como podría "automatizar" el ejemplo para que esta definición se haga automáticamente para que sin importar que resolución tenga todo trabaje correctamente.
Gracias
Saludos
Javier
Thanks Alex for sharing the code, but sorry I am unable to understand the operation.
gu_hk: = (0.8 * GetDesktopWidth ()) / (0.8 * 800)
gu_vk: = (0.8 * GetDesktopHeight ()) / (0.8 * 600)
in this code, 800 and 600 refers to my screen resolution (which I planned), or is the screen resolution on which to implement the program (the client), do the following tests, work at a resolution of 1280 * 800, if I run the program for that resolution and I do not change the variables gu_hk and gu_vk these values, the result is not desired, then I have to change the value of variables gu_hk := 1280 and gu_vk := 800, I run and everything goes well, the question is how could "automate" the example for this definition is made automatically so that no matter which resolution has everything to work correctly.
Thanks
Greetings
Javier
Spanish,
Gracias por compartir el código Alex, pero lo siento no soy capaz de entender el funcionamiento.
gu_hk := (0.8 * GetDesktopWidth() ) / (0.8 * 800)
gu_vk := (0.8 * GetDesktopHeight()) / (0.8 * 600)
en este código, 800 y 600 se refiere a mi resolución de pantalla (en donde estoy programando), o es la resolución de pantalla sobre la cual se ejecutará el programa (el cliente), hago las siguientes pruebas, trabajo a una resolución de 1280 * 800, si ejecuto el programa a esa resolución y no hago el cambio las variables gu_hk y gu_vk a esos valores, el resultado no es el deseado, entonces tengo que cambiar el valor de las variables gu_hk := 1280 y gu_vk := 800 y ejecuto y todo va bien, el tema es como podría "automatizar" el ejemplo para que esta definición se haga automáticamente para que sin importar que resolución tenga todo trabaje correctamente.
Gracias
Saludos
Javier