System.Drawing.Imaging.ImageAttributes.SetColorKey C# (CSharp) Method

SetColorKey() public method

public SetColorKey ( Color clrLow, Color clrHigh ) : void
clrLow Color
clrHigh Color
return void
		public void SetColorKey(Color clrLow, Color clrHigh)
		{
			SetColorKey(clrLow, clrHigh, ColorAdjustType.Default);
		}

Same methods

ImageAttributes::SetColorKey ( Color clrLow, Color clrHigh, ColorAdjustType type ) : void

Usage Example

Example #1
0
        // ctor
        public Tasklist()
        {
            // init colors
            this.BackColor = Const.BackColor;
            this.ForeColor = Const.CaptionColor;

            // gdi objects
            CreateGdiObjects();

            // state icons
            m_icons = new Bitmap[5];
            m_icons[0] = LoadImage("new.bmp");
            m_icons[1] = LoadImage("inProcess.bmp");
            m_icons[2] = LoadImage("complete.bmp");
            m_icons[3] = LoadImage("fail.bmp");
            m_icons[4] = LoadImage("cancelled.bmp");

            // need to draw transparent
            m_iconAttributes = new ImageAttributes();
            m_iconAttributes.SetColorKey(Color.Yellow, Color.Yellow);

            // store list of task items
            m_list = new ArrayList();

            // scroll bar
            m_scrollBar = new VScrollBar();
            m_scrollBar.Bounds = new Rectangle(0, 0, 4, 100);
            m_scrollBar.ValueChanged += new System.EventHandler(this.scrollBar_ValueChanged);
            this.Controls.Add(m_scrollBar);
        }
All Usage Examples Of System.Drawing.Imaging.ImageAttributes::SetColorKey