Friday, December 29, 2006
Windows XP dialog default font changed automatically!
Recently, we had a customer running chinese on his machine have a problem with the way in which fonts were being choosen for the dialog.
On all our machines the dialog would default to MS Sans Serif. But on this one machine it would switch to a serif based font.
We tried changing fonts via the Appearance dialog under Display Properties, but that would not do it. We even tried changing the DPI to recreate the issue, tried installing foreign language packs, but we just could not recreate the proble.
Then we found the following registry item : "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes"
Under that key are two entries MS Shell Dlg and MS Shell Dlg 2. These are set to Microsoft Sans Serif and Tahoma respectively on my machine. If you change these, then, VOILA!, the font used in the dialog started to change.
More info about this key is available at http://support.microsoft.com/kb/282187
Once we had a way to recreate the problem, we were able to provide a fix to the customer, as well as fix the code so that it would better scaled dialogs to handle different fonts.
Lesson here: never resize dialogs by hard-coded values. Either use the automatic scaling functionality provided by .NET 2.0, or resize to a location that is offset from a control on the dialog. That way, when fonts change and the position of the controls change, your dialog will resize to the new location without a problem.
This probably is my last post for 2006 - So HAPPY NEW YEAR!
Are ATMs safe
According to an article from MSNBC, ATMs could be hacked to divulge your account number and pin to a hacker. (Its not the ATM itself, but the method in which the information is sent to the bank, that makes the process insecure).
Here is an illustration of the points of vulnerability.
And read it in full at http://redtape.msnbc.com/2006/11/researchers_who.html#posts
Introduction to the Make Controller Kit in C#
From Coding for Fun:
Introduction to the Make Controller Kit in C#
The Make Controller Kit was developed by MakingThings in collaboration with Make Magazine to provide an open hardware platform that encourages experimentation, learning, and - most importantly - the creation of fun, interesting, and practical projects.
This article talks about using C# to control this controller.
Labels:
.NET
A GPS device that plugs into the SD memory slot!
Labels:
Gadgets
Subscribe to:
Posts (Atom)