SoFunction
Updated on 2025-04-09

Example code for icon extraction and icon conversion


namespace newExtIcon
{
    public partial class MainForm : Form
    {   
        public Assembly asm = ();
        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();
="Application|*.dll;*.exe|All Programs|*.*";
            if(()== )
            {
                Icon icon = ();
                FileStream fileStream = new FileStream("d:\\"+(1,100000)+".ico",);
                (fileStream);
                ();       
                lbl_display.Text="Work Done!";
            }
            else
            {
                return ;
            }
        }

        void BtnChangeClick(object sender, EventArgs e)
        {
            Size sz = new Size(32,32);
            Random rd = new Random();
="Picture|*.jpg;*.png;*.bmp|All programs|*.*";
//="Picture|*.jpg;*.png;*.bmp|App|*.dll;*.exe";
            if(()== )
            {
                using(Bitmap bm = new Bitmap())
                {
                    using(Bitmap IconBM = new Bitmap(bm,sz))
                    {
                        using(Icon icon_t = (()))
                        {
                            FileStream fileStream = new FileStream("d:\\"+(1,100000)+".ico",);
                            icon_t.Save(fileStream);
                            ();   
                            lbl_display.Text="Work Done!";        
                        }
                    }
                }
            }
            else
            {
                return ;
            }

        }
        void Pic_Click(object sender, e)
        {
            int int_index = Convert.ToInt32(((PictureBox)sender).Tag) ;
            switch(int_index)
            {
                case 1:
                    ();
                    ();
                    break;
                case 2:
                    WindowState = ;
                    break;
                default :
                    break;

            }

        }