In C# I am drawing things on panel using creategraphics,
and I need to pass these things to an image or a bitmap, how can I do that?
thank you
In C# I am drawing things on panel using creategraphics , and I need
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can draw directly to an
Imageby callingGraphics.FromImage.You can draw a
Controlto aBitmapby callingControl.DrawToBitmapBy the way, the correct way to draw to a control is to handle its
Paintevent and draw toe.Graphicsin it. If you draw a control usingCreateGraphics, it will be erased when the control is redrawn (eg, if you drag a window over it pre-Vista)