且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用c#.net windows应用程序在数据库中保存和检索图标?

更新时间:2023-09-28 11:21:46

要更改图标,只需更改Icon属性即可。请参阅 Form.Icon [ ^ ]。



为了创建图标,如果您将图标数据作为流获取,则可以使用图标构造函数(流) [ ^ ]



获取流取决于如何将数据存储在数据库中,但如果您使用例如文件流,那么本文可能会帮助如何将二进制数据存储和提取到文件流列 [ ^ ]
To change the icon, you simply change the Icon property. See Form.Icon[^].

In order to create the Icon, if you get the Icon data as a stream you can utilize Icon Constructor (Stream)[^]

Getting the stream depends how you store the data in the database but if you use for example file stream, then perhaps this article would help How to store and fetch binary data into a file stream column[^]