Feeds:
Posts
Comments

Archive for the ‘Uncategorized’ Category

ClearType Text

Two days back, I installed IE 7 on my PC. After installing it, I found a visible change in the fonts in both IE and Outlook. And as usual, change is always uncomfortable. The fonts were coming more of blurred type and not very clear. After struggling with these new font styles, I finally googled for the problem and came out across  a blog by Microsoft’s IE 7 project manager, which mentions what the new font style is all about.

http://blogs.msdn.com/ie/archive/2006/02/03/524367.aspx

Basically IE7 has come up with concept of “ClearType” text which makes text more readable and comprehensible to human eyes. It is especially useful for LCD monitors rather than old CRT monitors. But as Microsoft tries to dictate terms always, so they enable this in IE7 by default without even asking the user about it or telling how to turn if ON-OFF. Thankfully, the option is there to turn it off by using Tools ? Internet Options ? Multimedia ? Uncheck “Always use clear-type for HTML”. Once this is done and IE is restarted (very imp.), we return back to our good old fonts.

Coming back to ClearType text technology, this has been introduced in Office 2007 and Windows Vista by default. So whenever you install these softwares on your PC, these are enabled by default. I am yet to figure out how to turn them off. Presently I am using windows XP where ClearType text is turned off by default. We can turn it ON by changing some windows registry settings but that is always dangerous. A little more googling lead me to following link:-

http://www.microsoft.com/typography/ClearTypePowerToy.mspx

This is a downloadable utility which can be installed on your PC and then it appears in Control Panel. Using this you can turn on “ClearType” on your XP PC and also choose the setting and font contrast which you find most comfortable.

In the end, all these things are dependent on individual perception. Some people may like it, some may not. I am trying to adjust my eyes for this new font style from last two days and I have pretty much succeeded in that. Though fonts look slightly blurry in this style but their readability has definitely improved. I am to concentrate better while reading documents and web-pages.

In the end, its individual perception and comfort level to change that matters. But I recommend giving it a try atleast once. If you are not satisfied, you always have the option to turn it off. 🙂

~Mayank

Read Full Post »

Very often, in most of the windows application, there is a functionality in which the mouse cursor changes to hour-glass whenever the application is doing some background processing or is busy. This is done to give user an intimation to wait for application to finish processing.

We had a similar requirement in one of our web-applications. In the application, the mouser cursor has to be changed to hour-glass when user clicks on a particular button or whenever post-back happens. The cursor has to return back to normal as soon as the processing of the page finishes.

We achieved this functionality using JavaScript and HTML.

For this first we write a JavaScript function which changes the mouse cursor to hour-glass.

function ChangeToHourGlass()
{
  document.body.style.cursor = ‘wait’;
}

Now we need to call this function appropriately so that the required effect is achieved. So we call this function in two page events – onbeforeunload and onunload. This is done by adding these events handlers in the “body” tag of your ASPX/HTML page.

<body onbeforeunload=”ChangeToHourGlass();” onunload=”ChangeToHourGlass ();”>

Now let’s explain in short about both these event handlers:-

Onbeforeunload – This event is fired before a page is getting unloaded.
OnUnload – This event is fired just before the page is getting unloaded.

How the actual functionality works:-

When we click on a submit button in a page, the current page is unloaded. So one of these events is fired and the mouse cursor changes to hour-glass. While the request goes to back-end and returns back with the result, the current page continues to display. So mouse cursor appears as hour-glass. As soon as the back-end processing is finished, the page is re-created in which the mouse cursor returns back to normal. Hence the desired functionality is achieved.

The reason for using both these event handlers is that Internet Explorer browser prefers “Onbeforeunload” event while other browsers prefer “OnUnload” event. So to make this functionality work in all types of browsers, the JavaScript function is called in both these events.

~Mayank

Read Full Post »

From quite some time, I have been thinking of starting a technical blog. I already have my personal blog at http://diaryofmayank.blogspot.com/. While my personal blog is restricted to topics and happenings revolving around myself, the technical blog will be purely focused on my daily technical learning, new topics I learn and implement in my professional work. Sometimes, I learn quite a few things by searching on various website etc. Some links are quite interesting sometimes but I am never able to keep track of them. They always get lost in the myriad web. This blog is an attempt to keep track of all those learning and also share it with the whole world.

With that, I announce the launch of my Tech-Turf.

Hoping this blog will become a center of learning not only for me but for others too.

~Mayank

Read Full Post »