Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

GUIs displaying differently on other machines


  • Please log in to reply
33 replies to this topic
Terrapin
  • Members
  • 107 posts
  • Last active: Feb 06 2007 03:38 PM
  • Joined: 15 Aug 2005
Hi Folks,

I have created over time, a handful of GUI windows. Quite a while back it was reported to me by someone that the GUI which appeared correctly on my computer, was obviously incorrect on someone else's.

I have two computers, networked and also with a KVM switch. I have created GUI's on each, and have not until yesterday displayed them on the other. They do not appear the same, (scrren resolution is the same - 1280x1024), but as best I can tell, there may be problems due to the fact that there are options (two seperate ones I think) under 'Display Properties' for displaying system fonts larger than the default. It does not seem to affect any other programs' GUI's, but it can drastically alter the font-size in AHK GUI's, causing controls to overlap, etc.

Also, I'm not sure that the fact that I have been largely using relative positioning of controls (possibly incorrectly?) isn't part of the problem.

Any help, please?

Thanks Much,

Bob
When it comes to Binary, there are 10 types of people. Those who get it and those who don't. :)

~Guest
  • Guests
  • Last active:
  • Joined: --
This may not be the answer, but I think you should compare the fonts on each computer which you are using for the GUI windows. I know that different computers, especially an older one and a newer one, can have two fonts of the same name in their font directories, but actually display quite differently. If this is the case, install whichever version of the font you prefer on both computers so it can act more 'universally' (make a backup if you wish).

Please tell if this is or isn't the problem.

Terrapin
  • Members
  • 107 posts
  • Last active: Feb 06 2007 03:38 PM
  • Joined: 15 Aug 2005
Thanks, I just checked and they are the same, same dates and filesizes.

I do have another application installed (not from ahk) which displays text poorly if the system font size is set to be above 'normal'.

Thanks again,

Bob
When it comes to Binary, there are 10 types of people. Those who get it and those who don't. :)

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

displaying system fonts larger than the default ... can drastically alter the font-size in AHK GUI's, causing controls to overlap, etc.

I seem to remember testing this and it did not impact scripts. The controls did not overlap (even with relative positioning).

If anyone has seen differently, please let me know what settings you changed in the Control Panel and which OS you're using.

Thanks.

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
I did recognize this at a friends (I am using XP SP2 and he used also XP (SP-unknown).

In this case the text of a text-control was exactly that long, that it did fit into the text-control. If I decreased the width by one the text is tiled into 2 lines.

This tile does occure at my friends system also with the textcontrol which fits exactly at my system.

I have used this Font-Settings:

Fontgröße = 9
Fontname = Verdana

My friend is using another XP-Style than I do (does this effect displaying fonts?)
From this time I made my text-controls 1px wider and no problems did occure from this time...

Thalon

Terrapin
  • Members
  • 107 posts
  • Last active: Feb 06 2007 03:38 PM
  • Joined: 15 Aug 2005
Chris, both of my boxes are running XP/SP2. I'm not certain that it is not ONLY changing the ICON size (dpi) which causes this for me. I have been unable to determine exactly what may cause it, but I will continue to keep an eye on it, and let you know if I discover anything other than icon size. I think changing the icon size under Display, can make a mess of a lot more than only AHK.

Thanks,

Bob
When it comes to Binary, there are 10 types of people. Those who get it and those who don't. :)

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
This problem has been reported to me yesterday evening:
A tester uses Win-XP with SP2 and classic-style and I tried the same configuration (without success).
All fonts are used AHK-standard (I just changed color and bold at 1 control).

At the left side the "problem"-view and on the right side how it looks at my pc:
http://www.bilderton...=1138010900.JPG

Should I try to set a font explicit?

Thalon

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
That's interesting. So relatively-positioned controls overlap on his PC but not yours, even when you shift to larger fonts?

All I would need to analyze this is a means of reproducing it on any Windows XP SP2 system (via Control Panel or other settings). If you find a way to make it do that on your system, please let me know.

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
This is the script I use to create this part of the GUI:
DetectHiddenWindows, on
SetTitleMatchMode, 3
#SingleInstance force

SetKeyDelay, , 10

Menu, Tray, NoIcon

Fenstername = Gameserver Manager

	Underworld = GS
	GS_Gui = 5:

	GoSub, Add_Menu

	Gui, 5: Add, Tab, vGSGameserver w270 h360, Overview|CMD|Options
	Gui, 5: Tab, Overview
	Gui, 5: Add, Groupbox, x+8 y+5 w250 h317 section,
	Gui, 5: Add, Text, xs+10 ys+20 w115 vGameserverOnline section,
	Gui, 5: Add, Text, xs+125 ys+0 w40 vGameserverOnlineAnzeige, Online
	Gui, 5: Add, Button, xs+170 ys-5 h23 w60 vStarteGameserver, Start

	Gui, 5: Add, Groupbox, x20 y75 w250 h275 section, Properties
	Gui, 5: Add, Text, xs+10 ys+25 section, IP Address
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSIPAdress,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 vGSIPAdressDD,
	Gui, 5: Add, Text, xs+0 ys+25 section, Player Info
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSPlayerInfo,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 AltSubmit vGSPlayerInfoDD, No player info|Standard player info|Extended player info
	Gui, 5: Add, Text, xs+0 ys+25 section, Game Name
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSGameName,
	Gui, 5: Add, Text, xs+0 ys+25 section, Confirmation
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSConfirmation,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 AltSubmit vGSConfirmationDD, Confirmation at init|No Confirmation at init
	Gui, 5: Add, Text, xs+0 ys+25 section, Password
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSPassword,
	Gui, 5: Add, Text, xs+0 ys+25 section, TCP Port
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSTCPPort,
	Gui, 5: Add, Text, xs+0 ys+25 section, Network Mode
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSNetworkMode,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 Altsubmit vGSNetworkModeDD, LAN|Internet
	Gui, 5: Add, Text, xs+0 ys+25 section, Game Mode
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSGameMode,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 Altsubmit vGSGameModeDD, Free Game|Playerkiller|Campaign Ancaria|Campaign Underworld
	Gui, 5: Add, Text, xs+0 ys+25 section, Difficulty
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSDifficulty,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 AltSubmit vGSDifficultyDD, Bronze|Silver|Gold|Platin|Niobium
	Gui, 5: Add, Text, xs+0 ys+25 section, Player
	Gui, 5: Add, Edit, xs+80 ys-4 w150 ReadOnly vGSPlayer,
	Gui, 5: Add, DropDownList, xs+80 ys-4 w150 Altsubmit vGSPlayerDD,



	GuiControl, 5:Hide, GSPlayerInfoDD
	GuiControl, 5:Hide, GSConfirmationDD
	GuiControl, 5:Hide, GSNetworkModeDD
	GuiControl, 5:Hide, GSGameModeDD
	GuiControl, 5:Hide, GSDifficultyDD
	GuiControl, 5:Hide, GSPlayerDD
	GuiControl, 5:Hide, GSIPAdressDD


	Gui, 5:Font, Bold,
	GuiControl, 5:Font, GameserverOnlineAnzeige

	Gui, 5:Show, , %Fenstername%
return


Add_Menu:
Menu, DateiMenu, Add, Reload, Reload
Menu, DateiMenu, Add,
Menu, DateiMenu, Add, Start CN, Reload
Menu, DateiMenu, Add,
Menu, DateiMenu, Add, Exit, Exit
Menu, OptionenMenu, Add, Start with GUI, Reload
Menu, OptionenMenu, Add, ReadOnly, Reload
Menu, OptionenMenu, Add, Save Changes, Reload

Menu, MyMenuBar, Add, &File, :DateiMenu
Menu, MyMenuBar, Add, &Options, :OptionenMenu

Gui, %GS_Gui%Menu, MyMenuBar
Menu, OptionenMenu, Check, ReadOnly
if Underworld != GS
	Menu, OptionenMenu, Disable, ReadOnly
Menu, OptionenMenu, Disable, Save Changes
return


Reload:
Reload

GuiClose:
WinHide, %Fenstername%
return
^!m::
Restore:
Suspend, Permit
WinShow, %Fenstername%
WinActivate, %Fenstername%
return

Exit:
ExitApp

^!l::
listlines
return
I do not know how to reproduce or to correct this at the moment. I'll try to set a specific font and maybe I find a possibility how to reproduce this at my pc also...

Thalon

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
How is the default font for GUIs determined?
On my system "ms sans serif" (size 9) is used if I do not set any other fonts via "Gui, Font".

How is it possible to change the systems default-font?

Answers to this questions would be great :)

Thalon

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Good question; I don't know either.

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
After a little discussion with a programmer (friend of me) we think that this could be because of changing the dpi of a font (e.g. from 96 to 120 dpi).
Can this be catched in any way? Maybe by reading this from registry? Or (best way) can this be handled by windows itself if there are some points obeyed when creating GUI?

Would be very great if we could find a solution soon, because I want to solve this problem before releasing international ;)

Thalon

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
Update:
Yes, my actual problem is caused by using 120 dpi (instead of 96) for system-appearance.
Has anyone any experience with handling this problem?

I can't simply make all controls a bit broader, because I have some configurations where controls depend on the length of the text.

It should be easily possible, because most applications do not have any problems with this setting...

Thalon

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

caused by using 120 dpi (instead of 96) for system-appearance.

Thanks. Assuming I can reproduce it, I'll try to resolve it for the next release.

Terrapin
  • Members
  • 107 posts
  • Last active: Feb 06 2007 03:38 PM
  • Joined: 15 Aug 2005

caused by using 120 dpi (instead of 96) for system-appearance.

Thanks. Assuming I can reproduce it, I'll try to resolve it for the next release.


I apologize for being out of touch for a couple of days. But thanks to you Thalon for testing and verifying that it is the dpi (hopefully this is the only case). It *might* require bold, as that is what I am using also, but I do not know for sure. And thanks to you Chris for looking into it.

I am using xp/sp2 and have been using Verdana mostly.

I need a new pair of glasses, otherwise I probably would not have found this Windows setting. :)

Bob
When it comes to Binary, there are 10 types of people. Those who get it and those who don't. :)