?
Solved

How to display different messages on a label

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

Pape,

Thx
0
Comment
Question by:abgconsulting
3 Comments
 
LVL 17

Assisted Solution

by:sonawanekiran
sonawanekiran earned 750 total points
ID: 37017161
0
 
LVL 9

Accepted Solution

by:
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()
0
 
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.
0

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