AutoHotkey Community

It is currently May 27th, 2012, 12:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: January 20th, 2006, 6:37 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
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. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 9:55 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 11:56 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
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. :)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 21st, 2006, 2:23 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Terrapin wrote:
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2006, 8:44 am 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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:
Quote:
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

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2006, 10:22 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
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. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 23rd, 2006, 11:12 am 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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.bildertonne.com/my.php?image=1138010900.JPG

Should I try to set a font explicit?

Thalon

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 23rd, 2006, 1:01 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 23rd, 2006, 1:34 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
This is the script I use to create this part of the GUI:
Code:
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

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2006, 9:36 am 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2006, 3:03 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Good question; I don't know either.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2006, 4:07 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2006, 11:06 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
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

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2006, 12:32 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thalon wrote:
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2006, 10:48 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
Chris wrote:
Thalon wrote:
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. :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, chaosad, jrav, MSN [Bot] and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group