|
-
Jul 6th, 2007, 12:34 PM
#1
[RESOLVED] Pen and Pens object dilemma
Hi everyone, I hope some one can give me some light on this. I have my CustomPaintEventArgs class that has “Pen” property so that it can be assigned with Pen or Pens object. Now here is the dilemma, I should dispose the pen object as soon as I finish with it but when the CustomPaintEventArgs’ “Pen” property is assigned with a Pens object it throws an exception (Changes cannot be made to Brush because permissions are not valid). How can I determine if the Pen property has Pens object. Actualy when it is used as Pens.Black it returns the Pens Black property which is a pen object.
Is there any solution to this? Thanks in advance.
VBDT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|