mcerk Posted April 16, 2005 Posted April 16, 2005 Hi. I'm drawing on picturebox with backgroudn image. How can I clear graphics? I want that Background image is still shown. Dim G As Graphics = Me.picMap.CreateGraphics() 'coordinate sistem Dim TranslateDx As Long = -375050 Dim TranslateDy As Long = -194050 Dim ScaleDx As Single = Me.picMap.Width / (624250 - 375050) Dim ScaleDy As Single = Me.picMap.Height / (29850 - 194050) G.TranslateTransform(TranslateDx, TranslateDy, MatrixOrder.Append) G.ScaleTransform(ScaleDx, ScaleDy, MatrixOrder.Append) 'here I want to clear graphics to draw new line 'draw line PenStojisce.EndCap = LineCap.Triangle G.DrawLine(PenStojisce, Me.BindingContext(ds.Tables(0)).Current("X1"), Me.BindingContext(ds.Tables(0)).Current("Y1"), Me.BindingContext(ds.Tables(0)).Current("X2"), Me.BindingContext(ds.Tables(0)).Current("Y2")) Quote
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.