Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim r As New Random() Dim sz = PictureBox1.Size Dim sw = Stopwatch.StartNew() Dim bmp As New Bitmap(sz.Width, sz.Height) Using g = Graphics.FromImage(bmp), b As New SolidBrush(Color.FromArgb(96, Color.Red)) g.Clear(Color.White) For i = 0 To 200000 g.FillEllipse(b, r.Next(PictureBox1.Width), r.Next(PictureBox1.Height), 3, 3) Next End Using sw.Stop() Dim oldImg = PictureBox1.Image PictureBox1.Image = bmp If oldImg IsNot Nothing Then oldImg.Dispose() MsgBox(sw.Elapsed.ToString()) End Sub