Resize forms

Started by Marc van Cauwenberghe, February 11, 2010, 01:54:34 PM

Previous topic - Next topic

Marc van Cauwenberghe

Hello Paul,

Thank you very much for the resize functionality.
One question: I often use child forms on the main form with controls. Is there an easy way to resize these since they do not have an ResizeRules property?

Marc 

Paul Squires

hmmm..... that's a good point. I never really thought about having the resize properties for WS_CHILD Forms. For the time being, I guess you would still need to manually resize the child forms and by doing that it should trigger the resizing of the controls on those child forms automatically.
Paul Squires
PlanetSquires Software

Petrus Vorster

Is there a solution for this by now?
I am struggling with this exact issue right now.
-Regards
Peter

Paul Squires

Petrus - is this the same problem that you emailed me about? I emailed you code that uses afxScaleX and afxScaleY that will properly position your child forms.
Paul Squires
PlanetSquires Software

Petrus Vorster

Yes, I posted here before I e-mailed you.
Still having a bit of a struggle though, my childform is not resizing even if i use the code as given.
Will practice a bit, and then if i still can get it working, will mail you again.

Thanks for the help
-Regards
Peter

Paul Squires

Hi Peter,

Please try the attached project. I am running my system at 125% resolution and the child form displays correctly (when the "Suspects" button is pressed) within the Frame on Form1.

I tried sending the project to your gmail address but gmail rejects any attachment with an exe in it.

Paul
Paul Squires
PlanetSquires Software

Paul Squires

Hi Peter,

I looked deeper into your project and I found many areas that needed to be corrected. I changed your main form so that it can be maximized to all resolutions and also resized dynamically. I also changed most of the "Resize Rules" that you had set. I added a function called "Resize_ChildForm" that specifically gets the size of the Frame on your main form and then resizes the applicable child form within the confines of that Frame. Try resizing your main form and you will see that your child form stays within the Frame area and all of the controls on that child form resize correctly according to the resize rules.

You project should now run correctly at all screen resolutions and DPI settings.
Paul Squires
PlanetSquires Software

Petrus Vorster

Paul I wonder if there are ANY other software suppliers that offers SUCH level of support like you do?
NOWHERE on the internet will you find this level of personal attention and help!

I thank you a million times!
-Regards
Peter

Rolf Brandt

Resize_ChildForm - Very useful function. Thanks for that one, Paul.

Rolf

Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

:D   You're welcome guys.
Paul Squires
PlanetSquires Software