Save code Dim savefiledialog1 As New SaveFileDialog Try savefiledialog1.Title = "save File" savefiledialog1.FileName = " *.bmp " savefiledialog1.Filter = "Bitmap |*.bmp* " If savefiledialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp) End If Catch ex As Exception End Try
this is the code for putting the image in the image box if possible could i have some help so that i could go straight form this code to the save without using a separate sub for it.
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.Format16bppRgb555) graph = Graphics.FromImage(screenshot) graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
picturebox1 is the box that the image is held in but i would prefere not to have it there and like i said before as soon as the screenshot is taken i would like it to be saved to a directory of the users choice.
If possible i would like each image to be named after the time it was taken.
This post has been edited by Asscotte: 19 February 2009 - 06:45 AM