|
-
Apr 24th, 2006, 11:13 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] draw shape using c#
hi,
I want to make a class that draw shapes.
if my class inherit from forms i can execute code but I dont want to inherit the form class.
my question is what the graphics value that correspond to System.Drawing.Graphics .
ex . System.Drawing.Graphics g = graphics value
thanks for the reply.
Popskie
-
Apr 24th, 2006, 11:22 PM
#2
Re: draw shape using c#
If you want to show your drawings on a form or control, you will need to use that control's graphics, and you will want to draw them in that control's OnPaint event using the graphics object provided by the PaintEventArg e.
If you want to create some graphics that are not visible to the user, for printing or whatever, you need to create a new bitmap/image of the appropriate size, then use Graphics.FromImage() to end up with a new graphics object.
At least I think
Good luck!
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Apr 25th, 2006, 12:41 AM
#3
Thread Starter
Fanatic Member
Re: draw shape using c#
thanks for nice info sunburnt
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
|