Click here to Skip to main content
15,895,833 members
Articles / Programming Languages / C#

A simple hotkey selection control for .NET

Rate me:
Please Sign up or sign in to vote.
4.50/5 (15 votes)
7 Aug 20062 min read 124.1K   3.3K   64  
An article that shows off a simple hotkey selection control
namespace HotkeyControl_demo
{
    partial class Demo
    {
        /// <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.hkControl1 = new exscape.HotkeyControl();
            this.hkControl2 = new exscape.HotkeyControl();
            this.btnCopyDown = new System.Windows.Forms.Button();
            this.btnCopyUp = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // hkControl1
            // 
            this.hkControl1.Hotkey = System.Windows.Forms.Keys.None;
            this.hkControl1.HotkeyModifiers = System.Windows.Forms.Keys.None;
            this.hkControl1.Location = new System.Drawing.Point(12, 12);
            this.hkControl1.Name = "hkControl1";
            this.hkControl1.Size = new System.Drawing.Size(207, 20);
            this.hkControl1.TabIndex = 0;
            // 
            // hkControl2
            // 
            this.hkControl2.Hotkey = System.Windows.Forms.Keys.None;
            this.hkControl2.HotkeyModifiers = System.Windows.Forms.Keys.None;
            this.hkControl2.Location = new System.Drawing.Point(12, 38);
            this.hkControl2.Name = "hkControl2";
            this.hkControl2.Size = new System.Drawing.Size(207, 20);
            this.hkControl2.TabIndex = 2;
            // 
            // btnCopyDown
            // 
            this.btnCopyDown.Location = new System.Drawing.Point(225, 11);
            this.btnCopyDown.Name = "btnCopyDown";
            this.btnCopyDown.Size = new System.Drawing.Size(69, 23);
            this.btnCopyDown.TabIndex = 1;
            this.btnCopyDown.Text = "Copy down";
            this.btnCopyDown.UseVisualStyleBackColor = true;
            this.btnCopyDown.Click += new System.EventHandler(this.btnCopyDown_Click);
            // 
            // btnCopyUp
            // 
            this.btnCopyUp.Location = new System.Drawing.Point(226, 37);
            this.btnCopyUp.Name = "btnCopyUp";
            this.btnCopyUp.Size = new System.Drawing.Size(68, 23);
            this.btnCopyUp.TabIndex = 3;
            this.btnCopyUp.Text = "Copy up";
            this.btnCopyUp.UseVisualStyleBackColor = true;
            this.btnCopyUp.Click += new System.EventHandler(this.btnCopyUp_Click);
            // 
            // Demo
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(306, 66);
            this.Controls.Add(this.btnCopyUp);
            this.Controls.Add(this.btnCopyDown);
            this.Controls.Add(this.hkControl2);
            this.Controls.Add(this.hkControl1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
            this.MaximizeBox = false;
            this.Name = "Demo";
            this.Text = "HotkeyControl demo application";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private exscape.HotkeyControl hkControl1;
        private exscape.HotkeyControl hkControl2;
        private System.Windows.Forms.Button btnCopyDown;
        private System.Windows.Forms.Button btnCopyUp;
    }
}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Sweden Sweden
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions