如何使用c#.net windows应用程序在数据库中保存和检索图标? [英] How to save and retrieve icon in database using c# .net windows application?

查看:61
本文介绍了如何使用c#.net windows应用程序在数据库中保存和检索图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



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



我想在运行时或使用c#.net windows应用程序更改Windows窗体图标。

这是应用程序的需要。 />


请帮帮我。



先谢谢。



Ankit Agarwal

软件工程师

Hello,

How to save and retrieve icon in database using c# .net windows application?

I want to change windows form icon at run time or using c# .net windows application.
It's a need for application.

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer

推荐答案

要更改图标,只需更改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[^]


这篇关于如何使用c#.net windows应用程序在数据库中保存和检索图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆