开发者

Saving pictureBox Image on Network Folder

开发者 https://www.devze.com 2023-01-08 17:13 出处:网络
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);

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号