Salat Posted March 21, 2003 Posted March 21, 2003 What I'm trying to do is: Draw something at the picturebox, and then set the whole paintings as an image, so I could draw it at some other controls useing DrawImage. I've searched the forum, msdn, help files and I didn't find the solution. thanks for help... Quote profesjonalne programowanie na zlecenie :)
*Gurus* divil Posted March 21, 2003 *Gurus* Posted March 21, 2003 You'll have to draw your image in an offscreen bitmap instead. You can then assign that image to a picturebox or draw it wherever you like. Use the Bitmap constructor to create the image, and use Graphics.FromImage to get a Graphics object from it to draw on it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Salat Posted March 21, 2003 Author Posted March 21, 2003 I don't get it... How can I draw on a bitmap offsreen? Quote profesjonalne programowanie na zlecenie :)
*Gurus* divil Posted March 21, 2003 *Gurus* Posted March 21, 2003 I just said... with the Bitmap constructor and Graphics.FromImage. Dim b As New Bitmap(100, 100) Dim g As Graphics = Graphics.FromImage(b) g.DrawLine(whatever) g.Dispose() myPictureBox.Image = b All untested of course but should work. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Salat Posted March 21, 2003 Author Posted March 21, 2003 oh my god.. it's working, Thank You Divil Quote profesjonalne programowanie na zlecenie :)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.