Click here to Skip to main content
11,566,092 members (51,843 online)
Click here to Skip to main content
Add your own
alternative version

A Transparent/Translucent Label Control with Moving Caption

, 16 Aug 2007 70.3K 2.1K 97
This article describes the creation of a Label custom control that can be translucent to the background.
doatransparentlabel.zip
DOATransparentLabel
DOATransparentLabel
Properties
bin
Debug
DOATransparentLabel.dll
DOATransparentLabel.pdb
obj
Debug
TempPE
DOALibrary.DOATransparentLabel.resources
DOATransparentLabel.csproj.GenerateResource.Cache
DOATransparentLabel.pdb
DOATransparentLabel.dll
Windows Form Transparent Label
Properties
Settings.settings
bin
Debug
Windows Form Transparent Mabel.vshost.exe
DOATransparentLabel.dll
DOATransparentLabel.pdb
Windows Form Transparent Mabel.exe
Windows Form Transparent Mabel.pdb
obj
Debug
TempPE
ResolveAssemblyReference.cache
DOALibrary.Form1.resources
Windows_Form_Transparent_Mabel.Properties.Resources.resources
Windows Form DOATransparentLabel.csproj.GenerateResource.Cache
Windows Form Transparent Mabel.pdb
Windows Form Transparent Mabel.exe
10201.jpg
namespace DOALibrary
{
    partial class Form1
    {
        /// <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()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panel1 = new System.Windows.Forms.Panel();
            this.doaTransparentLabel1 = new DOALibrary.DOATransparentLabel();
            this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // panel1
            // 
            this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage")));
            this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.panel1.Controls.Add(this.doaTransparentLabel1);
            this.panel1.Location = new System.Drawing.Point(0, 1);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(391, 272);
            this.panel1.TabIndex = 1;
            // 
            // doaTransparentLabel1
            // 
            this.doaTransparentLabel1.BackColor = System.Drawing.Color.OliveDrab;
            this.doaTransparentLabel1.Caption = "My Lotus Car";
            this.doaTransparentLabel1.DimmedColor = System.Drawing.Color.Red;
            this.doaTransparentLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.doaTransparentLabel1.ForeColor = System.Drawing.SystemColors.ControlText;
            this.doaTransparentLabel1.Location = new System.Drawing.Point(110, 199);
            this.doaTransparentLabel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.doaTransparentLabel1.Moving = DOALibrary.DOATransparentLabel.MoveType.DownToUp;
            this.doaTransparentLabel1.MovingActive = true;
            this.doaTransparentLabel1.Name = "doaTransparentLabel1";
            this.doaTransparentLabel1.Radius = 10;
            this.doaTransparentLabel1.ShapeBorderStyle = DOALibrary.DOATransparentLabel.ShapeBorderStyles.ShapeBSFixedSingle;
            this.doaTransparentLabel1.Size = new System.Drawing.Size(171, 54);
            this.doaTransparentLabel1.TabIndex = 0;
            // 
            // propertyGrid1
            // 
            this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Right;
            this.propertyGrid1.Location = new System.Drawing.Point(388, 0);
            this.propertyGrid1.Name = "propertyGrid1";
            this.propertyGrid1.Size = new System.Drawing.Size(281, 266);
            this.propertyGrid1.TabIndex = 2;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(669, 266);
            this.Controls.Add(this.propertyGrid1);
            this.Controls.Add(this.panel1);
            this.Name = "Form1";
            this.Text = "Transparent/Translucent Label";
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        #endregion

        private DOALibrary.DOATransparentLabel doaTransparentLabel1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.PropertyGrid propertyGrid1;
    }
}

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

Share

About the Author

Daniel Ortiz Acuna
Web Developer
Argentina Argentina
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150624.2 | Last Updated 16 Aug 2007
Article Copyright 2007 by Daniel Ortiz Acuna
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid