I'm using a timer to take screen captures after an amount of time and save the images to a specific path.
Private Sub tmrPS1_Tick(sender As Object, e As EventArgs) Handles tmrPS1.Tick
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshot
PictureBox1.Image.Save("C:\ImagesFolder\1.jpg")
tmrPS1.Enabled = False
End Sub
And I want another timer to delete them after I sent them with mail because I will have to take new ones. My question is how do I delete the images knowing the path?