Click here to Skip to main content
15,878,748 members
Articles / Programming Languages / C#

Load an EXE File and Run It from Memory

Rate me:
Please Sign up or sign in to vote.
4.88/5 (29 votes)
24 Apr 2006CPOL2 min read 340K   18.1K   88  
Simple application to load an EXE file and run it from memory (only for .NET compiled files)
namespace WinLauncher
{
    partial class frmDefault
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDefault));
            this.icoLauncher = new System.Windows.Forms.NotifyIcon(this.components);
            this.SuspendLayout();
            // 
            // icoLauncher
            // 
            this.icoLauncher.Icon = ((System.Drawing.Icon)(resources.GetObject("icoLauncher.Icon")));
            this.icoLauncher.Text = "Application Launcher";
            this.icoLauncher.Visible = true;
            // 
            // frmDefault
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(151, 52);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "frmDefault";
            this.ShowInTaskbar = false;
            this.Text = "Application launcher";
            this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
            this.Load += new System.EventHandler(this.frmDefault_Load);
            this.ResumeLayout(false);

        }

        #endregion

        public System.Windows.Forms.NotifyIcon icoLauncher;

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer HTML.it
Italy Italy
Simple C# Developer.

Comments and Discussions