Avoid Dialog size changes when Windows Text size is modified

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Avoid Dialog size changes when Windows Text size is modified

Post by migro » Sun Feb 24, 2013 12:12 am

Hi together,

Dialogs designed with the old Dialogdesigner (think it was pre V12.x) will not change their size or size of the text inside of the dialog, when the Windows text size is set from "smaller - 100% (default )" to "medium - 125%" or "lager - 150%".

Is there any property in the actual dialog designer which avoids resizing of dialogs when the Windows text resolution/size is changed for the system?
regards
migro

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Post by migro » Mon Feb 25, 2013 3:13 am

One information more. I'm using a background graphic in the dialog. This background isn't resized, when the windows text settings are modified. This makes the dialog looks really awful ;-)
regards
migro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Feb 25, 2013 9:56 am

This is why you should stick to standard Windows design principles and ALLOW the objects to resize when the user resizes his font. Don't try and work against the way Windows works and fix the sizes.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Mon Feb 25, 2013 10:33 am

In older dialogs my way around this was to set the font / size on the dialog independently of Windows:

Code: Select all

SetDialogObjectFont>Dialog,,%deffont%,%deffontsize%,0,0
Phil Pendlebury - Linktree

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Post by migro » Tue Feb 26, 2013 1:06 am

Thanks Marcus for the advice. But how do I set a Background image to be resizable? I tried several settings in the dialog designer (AutoSize=Tue, Proportional=True, Stretch=True) but none of these settings have any effect to the background image.
regards
migro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Feb 26, 2013 11:06 am

Don't use a background image.

What you could do is:

1. Put an Image control on the form
2. Set it's Align property to alClient
3. Load an image into it
4. Set the image to stretch

Now when you resize the form the image gets resized accordingly.

It could end up looking ugly as the proportions will vary.

This is one reason why you don't usually see background images on windows forms.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Post by migro » Tue Feb 26, 2013 12:32 pm

Many thanks Markus. It works really good and it looks nearly perfect ;-)
regards
migro

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts