i want to save picturebox开发者_如何学编程 image in a share folder on network i use this code pictureBox1.Image.Save(@"192.168.1.39\xxxxxx", System.Drawing.Imaging.ImageFormat.Jpeg);
but it rauses error please help me!
xxxxxx is name of shahre folder
A literal reading of your question ("xxxxxx is name of share folder") suggests that you're making a call like:
pictureBox1.Image.Save(@"192.168.1.39\myshare",
System.Drawing.Imaging.ImageFormat.Jpeg);
You'll need to specify the name of the file you want to create:
pictureBox1.Image.Save(@"192.168.1.39\myshare\myfile.jpg",
System.Drawing.Imaging.ImageFormat.Jpeg);
As far as I know, you can't use the IP of machine in order to access its disk. Try mapping the network folder as local drive on your machine, e.g. Z: and then:
pictureBox1.Image.Save(@"Z:\xxxxxx", System.Drawing.Imaging.ImageFormat.Jpeg);
精彩评论