how to do rubber banding on Vista

I need help with getting rubber band lines to work on Vista.

I've tried using DrawReversibleLine which works on windows XP, but this no longer works on Vista.

I'm tring to draw "preview" lines and boxes, for expanding a graph, which move as the mouse is moved. This is similar to tools used to capture an area of screen, or select a region in the paint program.

Basically, as the mouse moves, the previous line needs to disappear, and a new line is drawn to the new cursor position. In older development tools this was done using XOR plotting, but this is also no longer available.

I've seen a number of frustrating articles on "Why you should not write to the screen" and "how this spoils the graphics pipeline" which leads me to understand how this got broken, but to me it's a critical product feature.

I need to know what .Net methods can be used to create these "rubber band" lines on Vista.

Added note:

This feature works if I use the "windows classic" display, or "Windows standard" or "Windows Vista Basic". It only fails on "windows Aero" color scheme.

Thanks.

[1152 byte] By [Trevor2006] at [2007-12-25]
# 1
Create a layered window instead. That's what all the cool kids are doing.
RaymondChen-MSFT at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,UI Development for Windows Vista...
# 2

That seems interesting. I've looked into this in the .net help.

I'm using C# in VS 2005. The examples for using layered windows seem to be all win32/C++ code. I can find a call to test if a layers are supported by the OS: OSFeature.LayeredWindows, but can't see anything to actually create and control such objects from .net 2.0.

Can you point me to an example, or parhaps any topic, class or method within .Net 2.0 to search for?

Thanks.

Trevor2006 at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,UI Development for Windows Vista...

Software Development for Windows Vista

Site Classified