How to display different messages on a label

Posted on 2011-10-24
Medium Priority
Last Modified: 2012-05-12
I want to display different messages on a label at intervals of 2 sec using timer.  sliding down.


Question by:abgconsulting
LVL 17

Assisted Solution

sonawanekiran earned 750 total points
ID: 37017161

Accepted Solution

sachinpatil10d earned 750 total points
ID: 37017169
Try some this like this

        public void startTimer()
            timer1.Enabled = true;
            timer1.Tick += new System.EventHandler(OnTimerEvent);       

        public void OnTimerEvent(object sender, EventArgs e)
            timer1.Interval = 2000;
            label1.Text = DateTime.Now.ToLongTimeString();

Open in new window

add a label and timer
copy both procedures and call the startTimer()
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 37017717
WinForms or WebForms?

Assumming WinForms, use a Timer control to get an event every 2 seconds.  To get the "sliding down" feature, change the Location() property in a Loop.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month16 days, 22 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question