国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

asp.net 圖標提取以及圖標轉換的實例代碼

2024-07-10 12:45:05
字體:
來源:轉載
供稿:網友

代碼如下:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
using System.Resources;
using System.Reflection;
using System.Runtime.InteropServices;


namespace newExtIcon
{
    public partial class MainForm : Form
    {   
        public Assembly asm = Assembly.GetExecutingAssembly();
        public MainForm()
        {
            InitializeComponent();       
        }

        void MainForm_Load(object sender ,EventArgs e)
        {
            lbl_display.Text ="No Work !";   

        }

        void btnExtractClick(object sender, EventArgs e)
        {
            Random rd = new Random();
            openFileDialog1.Filter="應用程序|*.dll;*.exe|所有程序|*.*";
            if(openFileDialog1.ShowDialog()== DialogResult.OK)
            {
                Icon icon = Icon.ExtractAssociatedIcon(openFileDialog1.FileName);
                FileStream fileStream = new FileStream("d://"+rd.Next(1,100000)+".ico",FileMode.Create);
                icon.Save(fileStream);
                fileStream.Close();       
                lbl_display.Text="Work Done!";
            }
            else
            {
                return ;
            }
        }

        void BtnChangeClick(object sender, EventArgs e)
        {
            Size sz = new Size(32,32);

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 桦川县| 嫩江县| 肥西县| 新密市| 南安市| 股票| 白沙| 孝感市| 海晏县| 明光市| 旌德县| 临安市| 土默特右旗| 东乌| 宜兴市| 陵川县| 犍为县| 松溪县| 尉犁县| 建阳市| 施甸县| 禄丰县| 三江| 厦门市| 东乡县| 马尔康县| 晋城| 岳普湖县| 文登市| 毕节市| 汉源县| 永州市| 玛纳斯县| 镇宁| 玛曲县| 新疆| 郯城县| 吉木萨尔县| 贵南县| 安图县| 丹棱县|