471,349 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Re: Drawing xor line on picture box. HELP!

On May 8, 1:11 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
On Thu, 08 May 2008 07:02:12 -0700, Chris Dunaway <dunaw...@gmail.com>
Have you looked at the ControlPaint.DrawReversibleLine method?
Perhaps that will do what you need.

Interesting...I've never seen that class before.

I'm a bit confused though; maybe you can elaborate on the purpose of that
class. All of the examples that I looked at in the class documentation
show using the class to draw directly in a non-painting event handler.
Normally this would be a major no-no, since drawing done in that context
isn't persistent.

So then I thought "well, maybe this is some special kind of drawing the
ControlPaint class internally persists somehow". But then I see the
methods take a Graphics instance just like other drawing methods, and that
seems to suggest ControlPaint's not doing anything other than adding some
new features to Graphics (in fact, I suppose they might have been
extension methods had extension methods been around when ControlPaint was

Are the examples bogus? Or is there something more to ControlPaint than
just adding some extra ways to draw to a Graphics instance?

(Yeah, I could use Reflector and look myself, but I don't have Windows
running at the moment and I figure it'd be better to ask someone who might
have more practical experience with the class anyway).

I'm afraid that I can't offer anything more than what you have learned
on your own. I only suggested that class because I have seen the
original poster's question many times in various forums and that is,
invariably, the answer that is given. I haven't delved too deeply
into the subject myself.

Jun 27 '08 #1
0 943

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Toby Mathews | last post: by
reply views Thread by Tomi Holger Engdahl | last post: by
9 posts views Thread by davetelling | last post: by
4 posts views Thread by RobinS | last post: by
5 posts views Thread by Macias | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.