Graphics Class
-
Hi i work with System.Drawing.Graphic class . i want to save the variable to an image object and then restore the image to variable of graphic class . and another question : how can get the color of pixel in form ? have i must use the graphic class ? 2-when i draw a line in form and minimize the form after resoring form line is cleared . what i must do to save the contant of form ? Regards Amir Jalaly
-
Hi i work with System.Drawing.Graphic class . i want to save the variable to an image object and then restore the image to variable of graphic class . and another question : how can get the color of pixel in form ? have i must use the graphic class ? 2-when i draw a line in form and minimize the form after resoring form line is cleared . what i must do to save the contant of form ? Regards Amir Jalaly
Amir Jalaly wrote: i want to save the variable to an image object and then restore the image to variable of graphic class WHAT?? This makes no sense what-so-ever. The Graphics class doesn't represent an image of anything. Perhaps a better explanation of what you want to accomplish would help. Amir Jalaly wrote: when i draw a line in form and minimize the form after resoring form line is cleared . All your drawing on the form surface must be done in the Form's OnPaint event. You have to repaint your graphic items every time the form is redrawn, which happens quite frequently. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Hi i work with System.Drawing.Graphic class . i want to save the variable to an image object and then restore the image to variable of graphic class . and another question : how can get the color of pixel in form ? have i must use the graphic class ? 2-when i draw a line in form and minimize the form after resoring form line is cleared . what i must do to save the contant of form ? Regards Amir Jalaly
hi dear me too is working on these images and graphics ans: Q2:- Register the event handler of OnPaint to save the color of pixel use Getpixel(), it returns a Color object u can use it later. Graphics class surely helps. Abt Q1 i can't understand what have u asked plz ellaborate it
-
hi dear me too is working on these images and graphics ans: Q2:- Register the event handler of OnPaint to save the color of pixel use Getpixel(), it returns a Color object u can use it later. Graphics class surely helps. Abt Q1 i can't understand what have u asked plz ellaborate it
HI Thanks for your answer . i don't understand how i must use GetPixel . is that a func of graphic class ? Can you help me more ? Also i want to fill a area that i draw in my form . can help me plz ? Regards Amir Jalaly