Click here to Skip to main content
15,893,190 members
Articles / Programming Languages / C#

A simple example of adding movable label controls at runtime

Rate me:
Please Sign up or sign in to vote.
4.44/5 (4 votes)
23 Jan 2013CPOL 32.7K   1.4K   15  
I created a simple form with a button to add a label control at run time sequentially numbered; labels are movable and lines are drawn between labels.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace MovableLabels
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

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
Software Developer (Senior)
Egypt Egypt
I am an ERP developer using VFP9
I started as a Clipper 5.2 with DBase III+ in 1995, I worked with Access 2.0
Then I converted to VFP5.0 then VFP9, I worked on an ERP application written by FoxPro2.6

Recently, I started learning C#
I have a tendency to do generic work and build generic functions, I try to do that using C#

I'm preparing myself now to be a Framework C# programmer
First step I'll read the C# specification, when done I'll update this, I've already started this in Feb-27-2013

Comments and Discussions