Fork me on GitHub

Tag: Windows

Custom Draw ListView with Double Buffering

For one of my pet projects, I needed to add a graphic to certain ListView rows. I considered owner-drawing the control, but that seemed messy. What I really wanted was a way to draw on top of whatever Windows painted. I couldn’t find a nifty .NET way to do this, so remembering a technique from the MFC days, I decided to custom draw the ListView. This would let me inject my own drawing code and let Windows handle the rest. Perfect!

I had originally implemented the ListView using a control style to eliminate the annoying flicker every time the list was repainted. Once I started custom drawing the control, I saw odd artifacts in the ListView’s client area when I scrolled or moved the mouse. If I turned off double buffering, it worked fine.

Continue reading »

Vista: Defective By Design

After ten months, I’ve had a reasonably pleasant experience with Windows Vista. But I recently had a series of problems that really made me consider switching back to Linux on my desktop.

I came home from work Monday to find that my computer had restarted after seventy-two days uptime. I had been in the middle of a project the night before so I already wasn’t happy when I sat down. I tried to launch the Event Viewer to see what had caused the reboot, but got this error:

“Windows cannot access the specified device, path, or file. You may not have appropriate permissions to access the item.”

Now, I’m running as a least-privileged administrator with UAC enabled. I was never prompted to elevate. In fact, forcing it to elevate did nothing. And because the local administrator account is disabled, by default, I was out of luck.

Continue reading »

Installing Vista Beta 2 in VMware

Like many other developers, I wanted a chance to play with Windows Vista Beta 2. So I downloaded the whopping 3.2 GB DVD image (in twelve minutes). Since I don’t have a spare machine powerful enough to handle it, I decided to install Vista in a VMware virtual machine. This was, to say the least, not a clean and pleasant experience.

I opened my existing “Beta 1″ virtual machine with 256 MB of RAM and 8 GB of hard disk space, set the ISO as the boot media, and started it. Setup started, but then presented me with this:

The file WinSetup.dll could not be loaded or is corrupt. Setup cannot continue.

Continue reading »