AUG 31

While developing Presto's Sidebar Clock and other Windows Vista sidebar gadgets, I've struggled with debugging. Numerous web sites say that you can use Visual Studio to debug errors, but, up until now, I've never been able to get it to work. And writing any non-trivial gadget really requires the use of a debugger.

I finally figured out that only the professional versions of Visual Studio will allow debugging. I installed a fresh copy of Visual Studio 2008 Professional from MSDN and I'm up and running. It was so easy to set up that I'm mad I didn't get it going sooner. Unfortunately, the documentation out there is pretty abysmal regarding this topic.

On a related note, DebugView is pretty handy for sidebar gadget development as well.

tags: coding sidebar gadget vista debugging
permalink | comments | technorati
JUL 30

Late last year, I released Presto's Hard Drive Monitor, a Vista sidebar gadget that reports the remaining space on hard drives. It's been pretty successful at 30,000 downloads and counting. It initially supported four hard drives, which I thought would be enough. But the user demand for more drives was intense (the page for the gadget shows some of the user coments).

It would have been easy to have just made the gadget box bigger and added more drives. But I wanted to do it more elegantly and have the gadget grow and shrink and only use as much space as necessary. (As a side note, all Vista gadgets have a minimum height of 57 pixels, and it's not possible to shrink them less than that.)

Not having seen many gadgets that automatically change size, my usual method of just looking at how somebody else did it wouldn't work. I had to figure it out for myself. After many hours of experimenting, I finally ended up doing it as follows:

First, I inserted a <g:background> tag into the main body of the gadget:

<g:background id="background" src="images/background-black3.png"/>

The background image background-black3.png needed some work as well. Initially, it had a shadow and transparent border around it, but this caused problems when the image was stretched. To work correctly using this method, the top and bottom of the background image must be opaque.

With this tag in place, the following simple lines of Javascript change the gadget's height:

var heightInPixels = 100 = heightInPixels = heightInPixels

My actual code was a little more complicated in that it used the number of drives to figure out how high the gadget should be. But you get the idea. And you can download the actual gadget and look at the code if you want to learn more.

tags: vista gadgets code
permalink | comments | technorati
DEC 20

I've been running Windows Vista for almost two months now and figured that it was time for a status update. I've already talked about what I like, here are some dislikes that have manifested with daily use:

The security restrictions are very annoying. Many common acts (installing programs, deleting files from flash drives, changing network settings) trigger annoying permission popups. Sometimes a single action can trigger up to three permission prompts! Often the prompts are ridiculous -- such as asking you first if it's ok to prompt you, and then once you click "yes", actually doing the real permission prompt. It's hard to imagine the average user liking this. I am very close to trying to figure out how to disable the popups completely.

The driver support is seriously lacking. Hopefully this will improve greatly by launch time, although it's hard to see it happening in time since there is so much work to do. Most hardware manufacturers don't appear to have any official Vista driver support. A few more have beta drivers. And I'm not talking about obscure companies here. I have two relatively recent video cards (one ATI, the other nVidia) that both had weird quirks under Vista. The most recent drivers from each company don't fix the problems. Luckily, (video drivers aside), the drivers that Microsoft provides with Vista seem to generally be decent, so if they work fine for you, then you won't have any problems.

The semi-transparent "Aero theme" is interesting eye candy at first, but after a while I just disabled it. Often it's a little too translucent, showing too much of the background apps. This makes it difficult at times to read the active window. Sometimes it's hard to even tell which window has the focus! And the borders in Aero mode are really fat and space consuming. If all this isn't bad enough, some applications are incompatible with Aero mode and running them will cause the screen to flicker several times as Vista switches to non-Aero mode to accommodate the app.

Lastly, I have been pulling my hair out trying to get an HP x5400 media center extender working with Vista without success. It finally dawned on me to check the web, whereupon I learned almost immediately that v1 media center extenders aren't supported by Vista! (As a side note, it would have been nice if Vista had given me some sort of message letting me know that the v1 extender was incompatible.) So the millions of people who currently have a v1 extender are getting shafted completely. This is a pretty serious backward incompatibility problem and would be a significant reason not to upgrade to Vista in my opinion, especially if you rely on one of these media extenders. See Jason Tang's blog, Chris Lanier's blog, or this Green Button thread for more information.

tags: vista
permalink | comments | technorati

I downloaded and installed Vista RC2 a couple of days ago. First impressions below.

Things I really like about Vista

  • GUI Refresh/Update - looks really nice (esp. alpha blending tricks)
  • Sidebar
  • Start menu is vastly superior (Apple spotlight-style)
  • BitLocker hard drive encryption (haven't gotten it to work yet, but it will be cool when I do)
  • Windows-Tab functionality (cycles through open windows graphically)
  • ReadyBoost technology (uses flash drives to augment system RAM)
  • Built-in disk defrag is much better, no longer need separate program (sorry Diskeepeer!)

Things I don't like

  • Way too many "do you want to allow this" prompts (installing a simple program can require up to 6 confirmations!)
  • If Vista doesn't know your devices, finding drivers is a chore... I had to find new drivers for my video and sound, and it wasn't easy (all my friends who rip on installing Linux should try installing Vista sometime...)

More to come as I play around with it... hasn't crashed on me yet, which is a big plus :-)

tags: microsoft vista
permalink | comments | technorati