This should work for you
Add this:
[DllImport("user32.dll")]
[return:MarshalAs(UnmanagedType.Bool)]
public static bool InvertRect(IntPtr hDC, ref System.Drawing.Rectangle
lprc);
and call it like this
Graphics g = /* a valid graphics object */
Rectangle rect = /* the area you want inverted */
bool result = InvertRect( g.GetHdc(), ref rect);
HTH
Brian W
P.S. Before anyone starts flaming me, System.Drawing.Rectangle CAN be used
in P/Invoke calls try it for yourself. Ther is no need to recreate the RECT
structure.
"meicher" <in**@eichereng-dot-ch.no-spam.invalid> wrote in message
news:40********@Usenet.com...
Hello,
There exists a very good methode in C++ and MFC:
pDC->invertRectangle(pRec);
Is there any simular methode in C# and .Net ?
How can I use the API function <invertRectangle> in C# ?
Regards mike. :?:
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com