如何在c#中上传Windows窗体中的图像 [英] how to upload images in windows form in c#
本文介绍了如何在c#中上传Windows窗体中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在asp.net windows窗体中使用图片上传类型选项c#。
和我们这样做的网页表单将文件保存在一个文件夹中..所以我们可以这样做它也是windows形式或者在Windows窗体中我们只能存储到数据库??
how to use image upload type option in asp.net windows form c#.
and as we do it web forms saving images in a folder.. so can we do it it windows form too or in windows form we can only store to database??
推荐答案
我通过搜索代码项目找到了这篇文章的关键字:上传图片c# 。本文中的信息可能有助于您入门。
上传图像并在UI页面上显示 [ ^ ]
您可以编写程序来将图像存储在文件夹或数据库中。
I found this article by searching Code Project with the keywords: upload image c#. Information in this article may help get you started.
Uploading an Image and Displaying It on the UI Page[^]
You can code your program to store an image in a folder or in a database.
在WinForm中,您可以使用 OpenFileDialog [ ^ ]浏览文件然后你可以使用 File.Copy [ ^ ]将文件复制到另一个位置
检查此SO答案示例代码 [ ^ ]
in WinForm you can use OpenFileDialog [^] to browse the file and then you can use File.Copy[^] to copy the file to another location
Check this SO Answer for sample code[^]
这篇关于如何在c#中上传Windows窗体中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文