Monday, 16 February 2015

Blinking Text in C#.Net Windows Application

2/16/2015 - By Pranav Singh 0

This article will show you how you can create a blinking text in windows application using C#.net. in this article I have start text blinking on button click.


In this article first we will create a new windows application and add button label and a timer control.



Timer control.


Now set the timer control interval to fire.


Now add the below code.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {

        }
        int maxNumberOfBlinksCount = 10;
        int totalBlinkCount = 0;
        private void button1_Click_1(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            label1.Visible = true;
            totalBlinkCount++;
            if (totalBlinkCount == maxNumberOfBlinksCount)
            {
                timer1.Stop();
                label1.Visible = false;
                totalBlinkCount = 0;
            }
        }

    }
}

In above I have enabled the timer control on button click and now in I have generated the code to blink the text. In above code I have assign the max blink count of the text. After reaching the max no of blink count text blink will stop.

Now we have done run the application and check the output.


About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top