Click here to Skip to main content
15,896,489 members
Articles / Programming Languages / C#

The theory of moveable objects

Rate me:
Please Sign up or sign in to vote.
5.00/5 (126 votes)
24 Jan 2010CPOL97 min read 120.5K   3.2K   230  
This article describes an algorithm by which an object of an arbitrary shape can be made moveable and resizable.
namespace TheoryOfMoveableObjects
{
    partial class Form_NewComment
    {
        /// <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 .btnAdd = new System .Windows .Forms .Button ();
            this .textNewComment = new System .Windows .Forms .TextBox ();
            this .btnCommentFont = new System .Windows .Forms .Button ();
            this .btnCommentClr = new System .Windows .Forms .Button ();
            this .SuspendLayout ();
            // 
            // btnAdd
            // 
            this .btnAdd .DialogResult = System .Windows .Forms .DialogResult .OK;
            this .btnAdd .Location = new System .Drawing .Point (94, 80);
            this .btnAdd .MaximumSize = new System .Drawing .Size (120, 100);
            this .btnAdd .MinimumSize = new System .Drawing .Size (22, 22);
            this .btnAdd .Name = "btnAdd";
            this .btnAdd .Size = new System .Drawing .Size (80, 28);
            this .btnAdd .TabIndex = 7;
            this .btnAdd .Text = "Add";
            this .btnAdd .UseVisualStyleBackColor = true;
            // 
            // textNewComment
            // 
            this .textNewComment .Location = new System .Drawing .Point (12, 12);
            this .textNewComment .MaximumSize = new System .Drawing .Size (300, 200);
            this .textNewComment .MinimumSize = new System .Drawing .Size (80, 40);
            this .textNewComment .Multiline = true;
            this .textNewComment .Name = "textNewComment";
            this .textNewComment .ScrollBars = System .Windows .Forms .ScrollBars .Vertical;
            this .textNewComment .Size = new System .Drawing .Size (162, 62);
            this .textNewComment .TabIndex = 4;
            // 
            // btnCommentFont
            // 
            this .btnCommentFont .Image = global::TheoryOfMoveableObjects .Properties .Resources .Font;
            this .btnCommentFont .Location = new System .Drawing .Point (40, 80);
            this .btnCommentFont .Name = "btnCommentFont";
            this .btnCommentFont .Size = new System .Drawing .Size (28, 28);
            this .btnCommentFont .TabIndex = 6;
            this .btnCommentFont .UseVisualStyleBackColor = true;
            this .btnCommentFont .Click += new System .EventHandler (this .Click_btnFont);
            // 
            // btnCommentClr
            // 
            this .btnCommentClr .Image = global::TheoryOfMoveableObjects .Properties .Resources .palette_;
            this .btnCommentClr .Location = new System .Drawing .Point (12, 80);
            this .btnCommentClr .Name = "btnCommentClr";
            this .btnCommentClr .Size = new System .Drawing .Size (28, 28);
            this .btnCommentClr .TabIndex = 5;
            this .btnCommentClr .UseVisualStyleBackColor = true;
            this .btnCommentClr .Click += new System .EventHandler (this .Click_btnClr);
            // 
            // Form_NewComment
            // 
            this .AutoScaleDimensions = new System .Drawing .SizeF (8F, 16F);
            this .AutoScaleMode = System .Windows .Forms .AutoScaleMode .Font;
            this .ClientSize = new System .Drawing .Size (186, 121);
            this .Controls .Add (this .btnAdd);
            this .Controls .Add (this .btnCommentFont);
            this .Controls .Add (this .btnCommentClr);
            this .Controls .Add (this .textNewComment);
            this .DoubleBuffered = true;
            this .MaximizeBox = false;
            this .MinimizeBox = false;
            this .Name = "Form_NewComment";
            this .ShowIcon = false;
            this .Text = "New comment";
            this .Load += new System .EventHandler (this .OnLoad);
            this .MouseUp += new System .Windows .Forms .MouseEventHandler (this .OnMouseUp);
            this .MouseDown += new System .Windows .Forms .MouseEventHandler (this .OnMouseDown);
            this .FormClosing += new System .Windows .Forms .FormClosingEventHandler (this .OnFormClosing);
            this .MouseMove += new System .Windows .Forms .MouseEventHandler (this .OnMouseMove);
            this .ResumeLayout (false);
            this .PerformLayout ();

        }

        #endregion

        private System .Windows .Forms .Button btnAdd;
        private System .Windows .Forms .Button btnCommentFont;
        private System .Windows .Forms .Button btnCommentClr;
        private System .Windows .Forms .TextBox textNewComment;
    }
}

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
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions