Click here to Skip to main content
15,894,630 members
Articles / Desktop Programming / Win32

Restricting application execution in Windows

Rate me:
Please Sign up or sign in to vote.
4.86/5 (7 votes)
23 Apr 2009CPOL3 min read 29.6K   798   29  
How to lock up certain apps in Windows, or lock all up except the specified ones.
namespace LockUp
{
    partial class Splash
    {
        /// <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();
            this.pbox_splash = new System.Windows.Forms.PictureBox();
            this.tmrFader = new System.Windows.Forms.Timer(this.components);
            this.tmrWasteTime = new System.Windows.Forms.Timer(this.components);
            this.lnk_website = new System.Windows.Forms.LinkLabel();
            ((System.ComponentModel.ISupportInitialize)(this.pbox_splash)).BeginInit();
            this.SuspendLayout();
            // 
            // pbox_splash
            // 
            this.pbox_splash.Dock = System.Windows.Forms.DockStyle.Fill;
            this.pbox_splash.Image = global::LockUp.Properties.Resources.QSoft_Blank;
            this.pbox_splash.Location = new System.Drawing.Point(0, 0);
            this.pbox_splash.Name = "pbox_splash";
            this.pbox_splash.Size = new System.Drawing.Size(454, 167);
            this.pbox_splash.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.pbox_splash.TabIndex = 0;
            this.pbox_splash.TabStop = false;
            // 
            // tmrFader
            // 
            this.tmrFader.Interval = 40;
            this.tmrFader.Tick += new System.EventHandler(this.tmrFader_Tick);
            // 
            // tmrWasteTime
            // 
            this.tmrWasteTime.Interval = 1000;
            this.tmrWasteTime.Tick += new System.EventHandler(this.tmrWasteTime_Tick);
            // 
            // lnk_website
            // 
            this.lnk_website.AutoSize = true;
            this.lnk_website.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lnk_website.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(21)))), ((int)(((byte)(83)))));
            this.lnk_website.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
            this.lnk_website.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(21)))), ((int)(((byte)(83)))));
            this.lnk_website.Location = new System.Drawing.Point(290, 130);
            this.lnk_website.Name = "lnk_website";
            this.lnk_website.Size = new System.Drawing.Size(103, 15);
            this.lnk_website.TabIndex = 3;
            this.lnk_website.TabStop = true;
            this.lnk_website.Text = "QSoftOnline.com";
            this.lnk_website.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(21)))), ((int)(((byte)(83)))));
            this.lnk_website.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_website_LinkClicked);
            // 
            // Splash
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(454, 167);
            this.Controls.Add(this.lnk_website);
            this.Controls.Add(this.pbox_splash);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "Splash";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Splash";
            this.TransparencyKey = System.Drawing.Color.Lime;
            this.Load += new System.EventHandler(this.Splash_Load);
            ((System.ComponentModel.ISupportInitialize)(this.pbox_splash)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.PictureBox pbox_splash;
        private System.Windows.Forms.Timer tmrFader;
        private System.Windows.Forms.Timer tmrWasteTime;
        private System.Windows.Forms.LinkLabel lnk_website;

    }
}

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
Retired QSoft
Yemen Yemen
Biography?! I'm not dead yet!
www.QSoftOnline.com

Comments and Discussions