i want to make a save button for images without having to open a save file dialog so i would specify the name and location to save in the code
please help

'assign your image here
        Dim img As Image
        'name of your image file
        Dim Name As String = "MyImage.jpeg"
        'specify full path where you want to save your file
        Dim fileNameWithPath As String = "C:\Documents and Settings\navjyot.nishant\Desktop\" & Name
        'saving the image.
        img.Save(fileNameWithPath, System.Drawing.Imaging.ImageFormat.Jpeg)

Happy Coding:-)

'assign your image here
        Dim img As Image
        'name of your image file
        Dim Name As String = "MyImage.jpeg"
        'specify full path where you want to save your file
        Dim fileNameWithPath As String = "C:\Documents and Settings\navjyot.nishant\Desktop\" & Name
        'saving the image.
        img.Save(fileNameWithPath, System.Drawing.Imaging.ImageFormat.Jpeg)

Happy Coding:-)

thanks alot this worked exactly right i just changed your code a little:

Dim Name As String = TextBox2.Text + ".png"
        Dim fileNameWithPath As String = "C:\Program Files\Screencap2.0\" + TextBox1.Text + "\" + Name
        PictureBox1.Image.Save(fileNameWithPath, System.Drawing.Imaging.ImageFormat.Png)

P.S. im making a screen capturer so this on a timer and it saves as a bunch of pictures.

This question has already been answered. Start a new discussion instead.