Unified Diff

.NET

Custom Draw ListView with Double Buffering

by Bob on 30 May 2008, under .NET, C++/CLI, How To, Win32 & MFC, Windows

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…)
more...

Microsoft .NET Framework 3.0

by Bob on 18 June 2006, under .NET, Windows

Microsoft recently renamed WinFX to .NET Framework 3.0 in an attempt to clarify the platform’s purpose. A new website was created to provide helpful information as well as the beta download.

more...

.NET Rocks!

by Bob on 23 March 2006, under .NET, Windows

I recently had the impossible task of making one of my applications work on OS X. The school uses Microsoft SQL Server 2000 to house its huge volumes of data. The server is integrated with Active Directory to allow for trusted connections. This means that when a client connects to the server, they need only to authenticate locally in the domain. This makes password and privilege maintenance much easier.

The bad part is that only Windows client operating systems are capable of supporting trusted connections (NT Authentication). This means that I can’t write a program to interface with the database server unless it’s running on Windows. So when I was asked to make my Windows creation work on a Mac, I was at a loss. Fortunately, I had been writing the suite of tools in VB.NET, so I started investigating the possibility of running a .NET app on OS X.

I found two contenders: Mono and DotGNU Portable .NET. Both projects are free implementations of the .NET standard. Mono doesn’t seem to have the anti-Microsoft sentiment and was easier to install. Right out of the gate, Mono allowed me to run a .NET app on OS X. PNET complained about ncurses not being installed. While this is probably a simple fix, it was one step that Mono did not require.

The end result? I managed to clone my VB.NET app in C# and make it run smoothly on a Mac. High five for .NET!

more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!