When Form Height > Computer's GetDesktopHeight() Value

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
Red2
Posts: 282
Joined: Sat May 18, 2019 2:11 pm
DBs Used: Visual FoxPro, FoxPro
Location: United States of America

When Form Height > Computer's GetDesktopHeight() Value

Post by Red2 »

Hello All,

I would really appreciate some HMG-specific information. My current HMG/Harbour issue:

An HMG form's Height property can be greater than a user's computer's GetDesktopHeight() value. I need to dynamically "Resize" the form and keep all of its controls user-accessible.

This is my specific "Resize" problem. In Visual FoxPro I would simply add scroll bars to the form. Unfortunately, HMG's IDE does not present that option.

Question:
In HMG how do I "Resize" to let the user "scroll" and access the form's controls (when the form's vertical height exceeds the computer screen's height)?

I found an post to "scroll a window" (https://www.hmgforum.com/viewtopic.php?f ... oll#p59293). (At the Top.) However, I am too inexperienced in HMG/Harbour to implement or test it. I need some help! Does anyone have a working example (or more information)?

Finally am I simply missing a better solution?

Thank you very much for your generous and kind help.

Regards,
Red2
User avatar
mol
Posts: 3817
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: When Form Height > Computer's GetDesktopHeight() Value

Post by mol »

You can use form properties: virtualheight and virtualwidth.
See documentation. It works fine.
Red2
Posts: 282
Joined: Sat May 18, 2019 2:11 pm
DBs Used: Visual FoxPro, FoxPro
Location: United States of America

Re: When Form Height > Computer's GetDesktopHeight() Value

Post by Red2 »

Hi MOL,

Thank you so much for your prompt reply and solution. This looks like just what I need!

I was unable to find VirtualWidth or VirtualHeight in my "HMG_DOC.chm" file. However with just blindly experimenting I am getting some success.

Question:
Is there some way I use VirtualHeight without using VirtualWidth? (I am unable to figure out how).
Also, if anyone happens to know of any documentation on these properties I would like to learn more.

Thank you again for taking the time to share your great experience with me. That is most kind!

Regards,
Red2
User avatar
mol
Posts: 3817
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: When Form Height > Computer's GetDesktopHeight() Value

Post by mol »

See doc folder of HMG
I'm writing from phone now, I can help you tomorrow
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: When Form Height > Computer's GetDesktopHeight() Value

Post by andyglezl »

Hi
DEFINE WINDOW
Creates a Window Definition
DEFINE WINDOW <WindowName>
AT <nRow> ,<nCol>
WIDTH <nWindth>
HEIGHT <nHeight>
[ VIRTUAL WIDTH <nVirtualWindth> ]
[ VIRTUAL HEIGHT <nVirtualHeight> ]

[ TITLE <cTitle> ]
........
........
Question:
Is there some way I use VirtualHeight without using VirtualWidth? (I am unable to figure out how).
Also, if anyone happens to know of any documentation on these properties I would like to learn more.
New Properties:

ThisWindow|<FormName>.Handle --> nFormHandle
ThisWindow|<FormName>.Index --> nFormIndex
ThisWindow|<FormName>.IsMinimized --> lBoolean
ThisWindow|<FormName>.IsMaximized --> lBoolean
ThisWindow|<FormName>.ClientAreaWidth --> nWidth
ThisWindow|<FormName>.ClientAreaHeight --> nHeight

ThisWindow|<FormName>.NoCaption [ := | --> ] lBoolean
ThisWindow|<FormName>.NoMaximize [ := | --> ] lBoolean
ThisWindow|<FormName>.NoMinimize [ := | --> ] lBoolean
ThisWindow|<FormName>.NoClose [ := | --> ] lBoolean
ThisWindow|<FormName>.NoSize [ := | --> ] lBoolean
ThisWindow|<FormName>.NoSysMenu [ := | --> ] lBoolean
ThisWindow|<FormName>.HScroll [ := | --> ] lBoolean
ThisWindow|<FormName>.VScroll [ := | --> ] lBoolean

ThisWindow|<FormName>.Enabled [ := | --> ] lBoolean
Andrés González López
Desde Guadalajara, Jalisco. México.
Red2
Posts: 282
Joined: Sat May 18, 2019 2:11 pm
DBs Used: Visual FoxPro, FoxPro
Location: United States of America

Re: When Form Height > Computer's GetDesktopHeight() Value

Post by Red2 »

Hi Mol and Andyglezl,

Thank you so much for your absolutely expert help and advice. You pointed me right to the specific properties I needed but I was unaware of. Problem solved.

It is so fortunate that you (and many others) take your valuable time to graciously share your expertise and make this help available. It is also unfortunate that HMG, so very powerful and capable, is so often undocumented or the documentation obscure. This is quite a hurdle for those of us without an HMG/Harbour/Clipper background.

Again, thank you. I am so very appreciative for your valuable and kind help!
User avatar
mol
Posts: 3817
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: When Form Height > Computer's GetDesktopHeight() Value

Post by mol »

Almost all about HMG is described in DOC folder plus a lot of samples.
Some features you can find in changelog.txt.
Post Reply