Issue dated - 19th April 2004

-


Previous Issues

CURRENT ISSUE
INDIA NEWS
NEWS ANALYSIS
EVENTS
INDIA TRENDS
PRODUCT
SECURE SPACE
COLUMNS
TECH FORUM

THE C# COLUMN

BETWEEN THE BYTES
TECHNOLOGY
SPECIALS <NEW>
Symantec Report
Security Headquarters
JobsDB
MINDPRINTS
HMA BANKBIZ
EC SERVICES
ARCHIVES/SEARCH
IT APPOINTMENTS
Openings At Jobstreet.com
WRITE TO US
SUBSCRIBE/RENEW
CUSTOMER SERVICE
ADVERTISE
ABOUT US

 Network Sites
  IT People
  Network Magazine
  Business Traveller
  Exp. Hotelier & Caterer
  Exp. Travel & Tourism
  Exp. Pharma Pulse
  Exp. Healthcare Mgmt.
  Express Textile
 Group Sites
  ExpressIndia
  Indian Express
  Financial Express

 
Front Page > TechSpace > Story Print this Page|  Email this page

Tech forum

Tips and tricks

Windows XP – Managing icons in the SysTray

Now the name of this area has changed. It is called the ‘notification area’ on the taskbar. Come to think of it, many icons displayed here are present to quickly inform you about the status of whatever they represent. Sound, firewall connection, network, battery status or whatever.

It is all very nice. You can even put your own application icons in this area with some amount of programming. In fact, that has become a very popular thing with many tools and utilities vendor. I even find SysTray icons being used by applications that do not have anything to notify! They are just added for convenience and for additional visibility to their application.

The result of this is obvious. You have simply too many icons in the ‘notification area’. Here is an example of a typical notification area.

As you can see, half of these icons do not display any status information continuously. Some of these change their appearance when certain events occur. Some of these change the appearance when we manually choose some menu associated with them (e.g. sound icon becomes mute).

Now, the sheer number of these icons is becoming a nuisance. To counter this problem, Windows XP has added a nice feature. It allows you to customise which icons to show and when to show them.

To use this feature, just right-click on any empty area on the taskbar. Do not right-click on an existing running application or a notification area icon. Just click on any area not covered by these.

Now choose Properties.

Please note, I am talking about Windows XP. The dialog shown here will be different for earlier versions of Windows.

Select the ‘Hide inactive icons’ checkbox. And choose OK.

Now, what does inactive mean? Inactive means that you have not clicked on that icon for a long time now. The assumption here is that, if you find an icon useful, you will have clicked on it for some purpose. If you do not click on it for a long time, it is probably not as important to you. Therefore, Windows can hide it.

This works fairly well in most cases. However it has a limitation. What if you are interested in a particular icon that does not offer any menus for you to choose upfront? Instead, this icon is monitoring some internal events all the time, and it changes its appearance when something changes (an event occurs). The classic example of this is the network connection icon. Of course you can configure network settings by using the associated menus. However, more often than not you just want to have the icon there in the navigation area for your peace of mind. If the connection breaks for some reason, it will activate itself and change the visual icon to indicate a failed connection.

Now, if you like such a type of icon to be always visible and prevent Windows from hiding it, what to do? Of course this has been thought of.

Click on the Customize button and see the following dialog.

In this dialog, the icons are stored in two categories—Current icons and Past icons. Current icons are the ones you can see now. Past icons are those which were present earlier but now are either disabled or unloaded because the original application was uninstalled.

We will typically need to look the current icons only. You can browse through the list. The default behavior is ‘Hide when inactive’. You can change it to Always Show or Always Hide.

This way, your configuration will be most optimal and the icons will not unnecessarily pile up. Further, precious screen space is also saved by having a lesser number of icons on the navigation area.

Developer tip: If you want to know how to programmatically put your own icons in the system tray, read up the knowledgebase articles Q162613 and Q177095 on Microsoft TechNet site.

Background Intelligent Transfer Service

Remember what things like Windows Update does? They just ask your permission to keep your machine up-to-date and that’s it. After a while it tells you that it has downloaded all the required files / patches and is ready to install them. When does it download these things? You did not explicitly ask for those downloads. So how did it work?

The answer is Background Intelligent Transfer Service.

This is an interesting service offered in Windows 2000 and above. Background Intelligent Transfer Service (BITS) is used to transfer files asynchronously between a client and an HTTP server. BITS is a background file transfer mechanism and queue manager. Requests to the BITS service are submitted and the files are transferred using idle network bandwidth so that other network related activities, such as browsing, are not affected.

BITS suspends the transfer if a connection is lost or if the user logs off. BITS persists transfer information while the user is logged off, across network disconnects, and during machine restarts. When the user logs on, BITS resumes the user’s transfer job.

BITS uses a queue to manage file transfers. You can prioritise transfer jobs within the queue and specify whether the files are transferred in the foreground or background. Background transfers are optimal in that BITS uses idle network bandwidth to transfer the files and will increase or decrease the rate (throttle) at which files are transferred based on the amount of idle network bandwidth available. If a network application begins to consume more bandwidth, BITS decreases its transfer rate to preserve the user’s interactive experience.

BITS provides one foreground and three background priority levels that you can use to prioritise transfer jobs. Higher priority jobs preempt lower priority jobs; whereas, jobs at the same priority level share transfer time (round-robin scheduling prevents a large job from blocking the transfer queue). Lower priority jobs do not receive transfer time until all higher priority jobs are complete or in an error state.

How does one use it? The service is used by developers using the BITS API. Windows XP provides BITS only for downloads. Windows 2003 provides for both upload and download functionality. The method is simple, at least conceptually. The application that wants to transfer files creates a job in BITS. BITS then takes over the task of uploading / downloading the files. Now the original calling application can close. BITs will manage the job, security, scheduling, queuing and so on completely independently.

Benefits of BITS

These benefits are in comparison with other file transfer mechanisms available.

  • Background transfer of data by default:

Most other services run in foreground. This impacts the bandwidth usage and response times, especially on HTTP based low speed connections. BITS always runs in the background. BITS waits for bandwidth to be available. Depending upon the bandwidth, it transfers chunks of files. If the user starts actively working on the application which requires bandwidth, BITS will automatically stop working till the next idle opportunity arises.

  • Asynchronous and connection loss tolerant transfer:

BITS does not hope to or even attempt to transfer all the data in one session. It works asynchronously. It can tolerate multiple log offs as well as connection breakages without any problem. It will simply start where it stopped last time. This resilience makes it a very good tool in certain practical circumstances where you do not have much control over the user behavior and the infrastructure uptime.

  • It is very secure:

BITs, although asynchronous, supports all types of secure transfers. First of all it uses the security context of the calling application which created the transfer job. Secondly it supports HTTPS. It supports proxy server based authentication. Further, it supports all types of authentication (including Passport).

  • It manages transfers based upon priorities:

The jobs are created with a particular priority. There are four priorities within BITS. High priority jobs are taken up first. If all jobs are of the same priority, all are given available resources (bandwidth) for transfer in a balanced manner (time splicing). The highest priority is Foreground. Background transfer speed is adjusted automatically as per bandwidth availability and usage.

BITS extensions need to be loaded in IIS on Windows 2000 for it to work. In Windows 2003, this is a built in feature.

Other technologies like FTP, Sockets, WinInet, WinHTTP and CopyFiles API do not provide all these advantages.

  • BITS transfers one file at a time:

It does not support concurrent uploads or downloads. This is important because it has to handle files with potentially differing priorities. If while transferring a low priority file, it comes across a high priority file, it will simply stop the transfer and take up the high priority file. This results in effective and smart handling of workload.

BISADMIN tool

This is a command line utility. This is used to manage most of the functionality of the lifecycle of a BITS transfer job. It can also be used from a script. Similarly there is an IE based utility that demonstrates how to use BITS. Both these resources are available in the platform SDK.

About the Author:Dr Nitin Paranjape is the Chairman and MD of Maestros (Mediline). He is a consultant with many organisations, covering appropriate technology utilisation, business application of relevant technology, application architecture and audit as well as knowledge transfer. He has authored more than 650 articles on various technology-related subjects. He can be contacted at nitin@mediline.co.in
<Back to top>


© Copyright 2003: Indian Express Group (Mumbai, India). All rights reserved throughout the world. This entire site is compiled in
Mumbai by The Business Publications Division of the Indian Express Group of Newspapers.
Please contact our Webmaster for any queries on this site.