About align center controls on a form

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

jparada
Posts: 430
Joined: Fri Jan 23, 2009 5:18 pm

Re: About align center controls on a form

Post by jparada »

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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: About align center controls on a form

Post by esgici »

Hola Javier
jparada wrote:
... how could "automate" the example for made automatically so that no matter which resolution has everything to work correctly.
Please take look attached sample ( slightly modified version of C:\hmg\SAMPLES\MAINDEMO\demo.prg )

I hope it will help you.

Saludos

--

Esgici
Attachments
MAINDEMO.zip
(7.76 KiB) Downloaded 342 times
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: About align center controls on a form

Post by esgici »

Hola Javier
jparada wrote: ...
I have tried to align the center of a form, some controls, such as frame, buttons, progressbar, etc.. and not have done, am doing something like testing as we do in clipper with columns - len (control) (control for the use of len property width) / n but I was not working. Some guidance on this? Wish to align n number of buttons, not just one ...
...
Sorry, while working to answer second part of your question, we had missed first part.

Please take a look attached sample.

I hope that will give you an idea.

Saludos

--

Esgici
Attachments
CentCont.zip
(757 Bytes) Downloaded 369 times
Viva INTERNATIONAL HMG :D
jparada
Posts: 430
Joined: Fri Jan 23, 2009 5:18 pm

Re: About align center controls on a form

Post by jparada »

Translated by Google,

Hi Esgici, thank you very much for the code, I will use in my programs, it is very useful for me.

Thank you

Greetings
Javier

Spanish,

Hola Esgici, muchas gracias por el código, lo voy a usar en mis programas, es muy útil para mi.

Gracias

Saludos
Javier
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: About align center controls on a form

Post by sudip »

Hello Alex,

I shared your Gu_ImageBrowse2.zip "personally" with my friend Ross Mckenzie as he is very much interested.

And as this code is mainly developed with MiniGui Ext, is it possible for you to share this code to Minigui Ext Group also.
Actually they are very much interested about your code (after hearing from me :) )

I don't know whether it is ethical or not. So, please tell me if I did any wrong. :?

With best regards.

Sudip
With best regards,
Sudip
User avatar
Alex Gustow
Posts: 290
Joined: Thu Dec 04, 2008 1:05 pm
Location: Yekaterinburg, Russia
Contact:

Re: About align center controls on a form

Post by Alex Gustow »

sudip wrote:I shared your Gu_ImageBrowse2.zip "personally" with my friend Ross Mckenzie as he is very much interested.

And as this code is mainly developed with MiniGui Ext, is it possible for
you to share this code to Minigui Ext Group also.
Actually they are very much interested about your code (after hearing from me :) )

I don't know whether it is ethical or not. So, please tell me if I did any wrong. :?
Hi Sudip

It's very good news for me that my code is interesting for HMG-people!

It's not my code - it's our code! :) I can't do anything without community support (only "with a little help from my friends")... So it's "public domain" (of course - like all things in Harbour/HMG). Use it, public it, modify it as you want!.. I'm proud if my code called "interesting" or "useful". :)

My clients said about "Auto-zoom" (I use this way in my currently developed progs): "Yeah! Now I see a good, "eye-loved" screen - not a liiiittle black letters into a biiiig white window!"... and it's best words for me.

Can anybody think about "How to auto-zoomed images & icons?" (especially for increasing - interpolation etc.)?.. I can't solve this problem yet (when "zoom in" - quality is worse). :(
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: About align center controls on a form

Post by sudip »

Hi Alex,

Thank you very much :D
Can anybody think about "How to auto-zoomed images & icons?" (especially for increasing - interpolation etc.)?.. I can't solve this problem yet (when "zoom in" - quality is worse). :(
Yes, I must give a serious try to this thing.

With best regards.

Sudip
With best regards,
Sudip
Post Reply