how to make a save button

Thread Solved

Join Date: Nov 2009
Posts: 10
Reputation: Progr4mmer is an unknown quantity at this point 
Solved Threads: 1
Progr4mmer Progr4mmer is offline Offline
Newbie Poster

how to make a save button

 
0
  #1
Nov 22nd, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 7
Reputation: navjyotnishant is an unknown quantity at this point 
Solved Threads: 2
navjyotnishant navjyotnishant is offline Offline
Newbie Poster
 
0
  #2
Nov 23rd, 2009
  1. 'assign your image here
  2. Dim img As Image
  3. 'name of your image file
  4. Dim Name As String = "MyImage.jpeg"
  5. 'specify full path where you want to save your file
  6. Dim fileNameWithPath As String = "C:\Documents and Settings\navjyot.nishant\Desktop\" & Name
  7. 'saving the image.
  8. img.Save(fileNameWithPath, System.Drawing.Imaging.ImageFormat.Jpeg)

Happy Coding:-)
Navjyot Nishant
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 10
Reputation: Progr4mmer is an unknown quantity at this point 
Solved Threads: 1
Progr4mmer Progr4mmer is offline Offline
Newbie Poster
 
0
  #3
Nov 25th, 2009
Originally Posted by navjyotnishant View Post
  1. 'assign your image here
  2. Dim img As Image
  3. 'name of your image file
  4. Dim Name As String = "MyImage.jpeg"
  5. 'specify full path where you want to save your file
  6. Dim fileNameWithPath As String = "C:\Documents and Settings\navjyot.nishant\Desktop\" & Name
  7. 'saving the image.
  8. img.Save(fileNameWithPath, System.Drawing.Imaging.ImageFormat.Jpeg)

Happy Coding:-)
thanks alot this worked exactly right i just changed your code a little:
  1. Dim Name As String = TextBox2.Text + ".png"
  2. Dim fileNameWithPath As String = "C:\Program Files\Screencap2.0\" + TextBox1.Text + "\" + Name
  3. 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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 7
Reputation: navjyotnishant is an unknown quantity at this point 
Solved Threads: 2
navjyotnishant navjyotnishant is offline Offline
Newbie Poster
 
0
  #4
Nov 26th, 2009
ur welcome dude. :-)
Navjyot Nishant
Reply With Quote Quick reply to this message  
Reply

Tags
save

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 899 | Replies: 3
Thread Tools Search this Thread



Tag cloud for save
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC