• Aucun résultat trouvé

Fun with Active Desktop

Dans le document Hacking Windows ® XP (Page 109-112)

Active Desktop has been a feature of Windows ever since Windows 98. Over time, it has changed a lot and has become a very powerful feature when it is used to its full potential. I use the ability to display a Web page file as my background feature of Active Desktop to customize the way that I use my computer. Because you are able to display a Web page, the kind of infor-mation that you can display on your desktop is only limited to your knowledge of HTML (HyperText Markup Language), which is the language used to create Web pages. If you are new to HTML, then I suggest you get a book on it, such as Creating Web Pages For Dummies, or at least read a lot about HTML on the Web. For the purpose of this section, I am going to assume that you know a little HTML, or at least know how to use an HTML editor such as Microsoft FrontPage.

To give you an idea of what you can do with Active Desktop, I have written a short little Web page in HTML that I could use to help me get to work the best possible way. Currently, I live in the suburbs of Chicago and commute to work every day. During the summer, I like to take the train instead of driving to avoid wasting my time in traffic. However, because I have a long walk to get to work once I get off the train, I have to listen to the weather report to see if I

should drive because I don’t want to be soaked when I get to work if it rains. To speed up my routine in the morning, I could use Active Desktop to display the Web page that I created, which displays a live Chicago weather radar image on the desktop, as shown in Figure 3-10.

This way, I don’t even have to waste time going to any Web site; I just have to look at my desk-top on my computer and I can instantly judge for myself if it looks like it is going to be raining in the near future.

There are actually even cooler things that you can do with your Web page if you know HTML well enough. You can add links to your Web page that you can access on your desktop to launch programs or visit Web sites. Additionally, if you are very talented in HTML and other Web technologies such as ASP, you could write a Web page that is one big frame that points to an Active Server Page on an external Web server. Then you can program that external page to do almost anything you can think of, such as gathering news headlines or other data.

Okay, now that you know what you can do with this cool feature, I am going to show you how you can take advantage of it as well. The first part of using this feature is coming up with a Web page to set as your background. The following is the source code for my Web page that I am using to display my weather radar:

FIGURE3-10: Using Active Desktop to display a Web page as the desktop.

<html>

<head>

<META HTTP-EQUIV“Refresh” CONTENT“10”>

</head>

<body bgcolor“#0066CC”>

<p align“center”>

<font color“#FFFFFF” size“5” face“Verdana”>

Hacking Windows XP Active Desktop Demonstration

</font>

<br>

<img src”http://radblast.wunderground.com/cgi-bin/radar/

WUNIDS?stationLOT&brandwui&num1&delay15&typeN0R&frame 0&scale&noclutter0&t1076307247&lat41.88650131&lon -87.62449646&labelChicago,%2BIL”>

</p>

</body>

</html>

This is the content of my Web page file that is saved as radarpage.htm. Basically, the most important line in the code above is the META Refresh line. This is the line that automatically tells my browser, or Active Desktop, to refresh the page every 10 seconds. That way, I will always have an up-to-date radar image displayed on my desktop. All of the other lines are just standard HTML tags.

If you want to create a file like this, just open up Notepad and type in your HTML code and then save the file with an .htmextension.

Now, once you have your Web page made in either Notepad or a nice HTML editor, you are ready to set it up to be used as your desktop. To do this, follow these steps:

1.Right-click your Desktop and select Properties.

2.Next, click the Desktop tab and then click the Browse button that is located on the middle-right side of the window.

3.Navigate through your computer and select the Web page that you created to use as your background and then click OK to select it.

4.Click OK once more to save your changes and you are finished.

You will have to wait a few seconds as Active Desktop loads your desktop for the first time.

After that, the display properties window will go away and you should see your new desktop.

Have fun with this feature. If you learn HTML well enough, you can even start to include images that you make yourself to really give your computer a customized look and feel.

Dans le document Hacking Windows ® XP (Page 109-112)