myPictureBox.Image = New Bitmap(myPictureBox.ClientSize.Width, _
myPictureBox.ClientSize.Height)
and
Using g As Graphics = Graphics.FromImage(myPictureBox.Image)
' do the drawing '
End Using
thanks for your answer. But please tell me where can i place this code.