Click here to Skip to main content
15,905,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can create title movement in form?

Hello Every one
I need create title in the form is movement
and written the title letter by letter

Please Help me

http://www.webchinupload.com/f/2014-07/9e5fd324c83afd17d350156284367ff9.JPG
Posted
Updated 29-Jul-14 4:58am
v2

Not very clear,but let's try:

C#
public partial class Form1 : Form
    {
         Timer timerTitle;
         string title = "Codeproject Rulez!!";
         int length = 0;
         
         private void Form1_Load(object sender, EventArgs e)
        {
            timerTitle = new Timer();
            timerTitle.Interval = 1000;
            timerTitle.Enabled = true;
            timerTitle.Tick += new EventHandler(timerTitle_Tick);
        }

        void timerTitle_Tick(object sender, EventArgs e)
        {
            this.Text = title.Substring(0, length);
            length++;
            if (length > title.Length)
            {
                length = 0;
            }
        }


Something like this? This is a start. If you want a scroller or anything else,starting with this you should be able to do it.
 
Share this answer
 
Comments
[no name] 29-Jul-14 18:15pm    
Thanks for you
Pikoh 30-Jul-14 2:47am    
i guess you haven't added the timerTitle_Tick method. See my answer and copy it.
[no name] 30-Jul-14 5:52am    
how can adding timer ?
please download mu project and please answer or solving my problem
thanks for you
[no name] 31-Jul-14 18:22pm    
I was copied this code but it say error :(

please help me Mr . Pokoh
Just copy this in your form2

C#
Timer timerTitle;
        string title = "Welcome To Bilal PC Program!!";
        int length = 0;
        public Form2()
        {
            InitializeComponent();
        }
        int i;
        private void Form2_Load(object sender, EventArgs e)
        {
            timer1.Start();
            this.BackColor = Color.YellowGreen;
            timerTitle = new Timer();
            timerTitle.Interval = 1000;
            timerTitle.Enabled = true;
            timerTitle.Tick += new EventHandler(timerTitle_Tick);
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            ++i;
            pictureBox1.Image = System.Drawing.Image.FromFile(+i + ".jpg");
            if (i == 8)
            {
                i = 0;
            }
        }

        private void timerTitle_Tick(object sender, EventArgs e)
        {
            this.Text = title.Substring(0, length);
            length++;
            if (length > title.Length)
            {
                length = 0;
            }
        }
 
Share this answer
 
Comments
[no name] 30-Jul-14 8:07am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900