简体   繁体   English

使用C#在Windows Mobile 5.0中保存图像

[英]Save image in Windows Mobile 5.0 using C#

I am saving image in windows mobile application using C#.My code is 我正在使用C#将图像保存在Windows Mobile应用程序中。

    SaveFileDialog dialog = new SaveFileDialog();
    if (dialog.ShowDialog() == DialogResult.OK)
    {
        aspectRatioPictureBox1.Photo.Save(dialog.FileName, System.Drawing.Imaging.ImageFormat.Bmp);
    }

In the above code i am able to save only in folders of MyDocument But i am not able to browse to save in other folders.. 在上面的代码中,我只能保存在MyDocument的文件夹中,但是我无法浏览以保存在其他文件夹中。

Please let know the code to save image through browsing the location 请告知代码以通过浏览位置保存图像

Thanks in Advance 提前致谢

The default open and save file dialogs are not very good at all. 默认的打开和保存文件对话框不是很好。

Firstly they can only look at My Documents and sub folders. 首先,他们只能查看“我的文档”和子文件夹。 Secondly the user interface is very poor and old fashioned. 其次,用户界面非常糟糕且过时。

We ended up rolling our own file save dialog. 我们最终滚动了自己的文件保存对话框。 And while we where at it we also added gesture based scrolling and file text which was large enough to use with a finger. 在此同时,我们还添加了基于手势的滚动和文件文本,该文本足够大,可以用手指使用。 I would definitely recommend finding an alternative or writing your own which is a good exercise in itself. 我绝对会建议您找到一个替代方法或自己编写一个本身就是一个很好的练习。

The default Open and Save dialogs are just very limited, there's little you can do if you keep using them. 默认的“打开”和“保存”对话框非常有限,如果继续使用它们,您将无能为力。

If you browse around though, I'm sure you can find alternative implementations for these dialogs. 但是,如果您四处浏览,我相信您可以找到这些对话框的替代实现。 One of the first that came up in a quick google search is this one . 快速谷歌搜索中出现的第一个就是这个 I haven't tested it and I'm sure there are others, but it may give you a start. 我还没有测试过,而且我敢肯定还有其他功能,但这可能会让您有所收获。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM