Temporary disabling GDIplus

Is it possible to disable GDIPlus temporary on windows? (or at least the AntiAliasing).
I tried app.UseGdiPlus=false before I do the drawing and then app.UseGDIPlus=true afterwards, but it does not seem to have any impact.

There is a trick I use a lot in our programs to find out where something is drawn. Every ‘object’ has a unique color. The contour of this object is drawn on a seperate picture. Checking the pixel under the mouse in this picture quickly finds out the object you are over. A full description of this technique can be found on my blog: http://alwaysbusycorner.com/2011/09/22/detecting-pixel-precise-clicktouch-in-irregular-shapes/

However, because of the antialiasing, this trick does not work anymore.

The picture created now:

The picture it should be for this technique to work:

I know in GDIPlus it is possible by using: ‘g.SmoothingMode = SmoothingMode.None’ at any time when you’re drawing.

g.antialias=false ?

Thank you so much @Massimo Valle ! Exactly what I wanted. Completely missed that one.