Click here to Skip to main content
15,885,869 members
Articles / Desktop Programming / Windows Forms

Scrolling Credits Control

Rate me:
Please Sign up or sign in to vote.
4.12/5 (12 votes)
14 Jun 20052 min read 68.2K   1.6K   29  
A scrolling text and image control with smooth flicker free movement and mouse interference feature.
using System;
using System.Collections.Generic;

namespace ScrollingBox
{
    public class ScrollingBoxCollection : System.Collections.CollectionBase
    {
        public event EventHandler OnCollectionChanged;
        public ScrollingBoxCollection()
        {
        }
        public int Add(ScrollingBoxItem value)
        {
            int index = base.InnerList.Add(value);
            if (OnCollectionChanged != null)
            {
                OnCollectionChanged(this, new EventArgs());
            }
            return index;
        }
        public int Add(string Text)
        {
            return this.Add(new ScrollingBoxText(Text));
        }
        public void InsertAt(int index, ScrollingBoxItem value)
        {
            base.InnerList.Insert(index, value);
            if (OnCollectionChanged != null)
            {
                OnCollectionChanged(this, new EventArgs());
            }
        }
        public void Remove(ScrollingBoxItem value)
        {
            base.InnerList.Remove(value);
            if (OnCollectionChanged != null)
            {
                OnCollectionChanged(this, new EventArgs());
            }
        }
        public ScrollingBoxItem this[int index]
        {
            get
            {
                return (ScrollingBoxItem)base.InnerList[index];
            }
            set
            {
                base.InnerList[index] = value;
            }
        }
    }
}

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


Written By
Web Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions