Control Palette : Icon Image « 2D Graphics « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Class Interface
3. Collections Data Structure
4. Components
5. Data Types
6. Database ADO.net
7. Design Patterns
8. Development Class
9. Event
10. File Stream
11. Generics
12. GUI Windows Form
13. Language Basics
14. LINQ
15. Network
16. Office
17. Reflection
18. Regular Expressions
19. Security
20. Services Event
21. Thread
22. Web Services
23. Windows
24. XML
25. XML LINQ
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
C# / C Sharp » 2D Graphics » Icon ImageScreenshots 
Control Palette
Control Palette

/*
User Interfaces in C#: Windows Forms and Custom Controls
by Matthew MacDonald

Publisher: Apress
ISBN: 1590590457
*/

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

    /// <summary>
    /// Summary description for ControlPalette.
    /// </summary>
    public class ControlPalette : System.Windows.Forms.Form
    {
        internal System.Windows.Forms.ImageList images;
        internal System.Windows.Forms.Label lblPictureThree;
        internal System.Windows.Forms.Label lblPictureTwo;
        internal System.Windows.Forms.Label lblPictureOne;
        private System.ComponentModel.IContainer components;

        public ControlPalette()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Disposebool disposing )
        {
            ifdisposing )
            {
                if(components != null)
                {
                    components.Dispose();
                }
            }
            base.Disposedisposing );
        }

        #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();
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ControlPalette));
            this.images = new System.Windows.Forms.ImageList(this.components);
            this.lblPictureThree = new System.Windows.Forms.Label();
            this.lblPictureTwo = new System.Windows.Forms.Label();
            this.lblPictureOne = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // images
            // 
            this.images.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
            this.images.ImageSize = new System.Drawing.Size(1616);
            this.images.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("images.ImageStream")));
            this.images.TransparentColor = System.Drawing.Color.Transparent;
            // 
            // lblPictureThree
            // 
            this.lblPictureThree.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lblPictureThree.Image = ((System.Drawing.Bitmap)(resources.GetObject("lblPictureThree.Image")));
            this.lblPictureThree.ImageIndex = 2;
            this.lblPictureThree.ImageList = this.images;
            this.lblPictureThree.Location = new System.Drawing.Point(8112);
            this.lblPictureThree.Name = "lblPictureThree";
            this.lblPictureThree.Size = new System.Drawing.Size(5648);
            this.lblPictureThree.TabIndex = 3;
            this.lblPictureThree.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lbl_MouseDown);
            // 
            // lblPictureTwo
            // 
            this.lblPictureTwo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lblPictureTwo.Image = ((System.Drawing.Bitmap)(resources.GetObject("lblPictureTwo.Image")));
            this.lblPictureTwo.ImageIndex = 1;
            this.lblPictureTwo.ImageList = this.images;
            this.lblPictureTwo.Location = new System.Drawing.Point(860);
            this.lblPictureTwo.Name = "lblPictureTwo";
            this.lblPictureTwo.Size = new System.Drawing.Size(5648);
            this.lblPictureTwo.TabIndex = 2;
            this.lblPictureTwo.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lbl_MouseDown);
            // 
            // lblPictureOne
            // 
            this.lblPictureOne.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.lblPictureOne.Image = ((System.Drawing.Bitmap)(resources.GetObject("lblPictureOne.Image")));
            this.lblPictureOne.ImageIndex = 0;
            this.lblPictureOne.ImageList = this.images;
            this.lblPictureOne.Location = new System.Drawing.Point(88);
            this.lblPictureOne.Name = "lblPictureOne";
            this.lblPictureOne.Size = new System.Drawing.Size(5648);
            this.lblPictureOne.TabIndex = 1;
            this.lblPictureOne.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lbl_MouseDown);
            // 
            // ControlPalette
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(513);
            this.ClientSize = new System.Drawing.Size(76174);
            this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                          this.lblPictureThree,
                                                                          this.lblPictureTwo,
                                                                          this.lblPictureOne});
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
            this.Name = "ControlPalette";
            this.Text = "Pictures";
            this.ResumeLayout(false);

        }
        #endregion

        private void lbl_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            Label lbl = (Label)sender;
            lbl.DoDragDrop(lbl.Image, DragDropEffects.Copy);
        }
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() 
        {
            Application.Run(new ControlPalette());
        }

    }



           
       
Related examples in the same category
1. Image Paint Simple DemoImage Paint Simple Demo
2. Image Warper AppImage Warper App
3. Draw imageDraw image
4. Image Icon FormImage Icon Form
5. Icon Image DrawIcon Image Draw
6. Image ClassImage Class
7. MetaFile and DrawMetaFile and Draw
8. Picture ControlsPicture Controls
9. Cube ImageCube Image
10. Image Zoom 1Image Zoom 1
11. Image FlipImage Flip
w__w_w.___j_a_v___a_2s__.co__m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.