Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 02:17

  • Please register to post and access all features, it's quick, easy and FREE!

 

C# Label text changing each second

Reply
 
Old   #1
 
elite*gold: 20
Join Date: Oct 2008
Posts: 326
Received Thanks: 43
C# Label text changing each second

Hey Coders
I want to make my Labels text changing each second, It must start over at a certain time. how to script this?

Thanks



jackpotsvr is offline  
Old   #2
 
elite*gold: 37
Join Date: Apr 2004
Posts: 2,156
Received Thanks: 250
add a timer which┤s set to 1000ms and have it change the label text in its tick event ,...


x]vIrus[x is offline  
Thanks
1 User
Old   #3
 
elite*gold: 20
Join Date: Oct 2008
Posts: 326
Received Thanks: 43
Quote:
Originally Posted by x]vIrus[x View Post
add a timer which┤s set to 1000ms and have it change the label text in its tick event ,...
Yeah, i found out already, but the only problem is i want it to stop at a certain time and start over. How to do that?

Current Code is

Quote:
private void timer1_Tick(object sender, EventArgs e)
{
Label.Text = Label.Text + "|";
My label called Label as you can see
jackpotsvr is offline  
Old   #4
 
elite*gold: 0
Join Date: Nov 2009
Posts: 440
Received Thanks: 353
do so:

Code:
int StopTime = 0;
private void timer1_Tick(object sender, EventArgs e)
{
    if (StopTime <= 10)
    {
      Label.Text += "|";     // " += " is the short way of label1.text = label.text + "?????"
      StopTime++;            //means: StopTime = StopTime + 1 or StopTime += 1
    }
    else
    {
      Label.Text = "";
      StopTime = 0;
    }
}


waldi_ is offline  
Thanks
1 User
Old   #5
 
elite*gold: 20
Join Date: Oct 2008
Posts: 326
Received Thanks: 43
Quote:
Originally Posted by waldi_ View Post
do so:

Code:
int StopTime = 0;
private void timer1_Tick(object sender, EventArgs e)
{
    if (StopTime <= 10)
    {
      Label.Text += "|";     // " += " is the short way of label1.text = label.text + "?????"
      StopTime++;            //means: StopTime = StopTime + 1 or StopTime += 1
    }
    else
    {
      Label.Text = "";
      StopTime = 0;
    }
}
It works!
Thanks! Im gonna edit it little bit more! XD


jackpotsvr is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
changing chat text color ?
is it possible to change chat text color ? i tried to search but i didn't find anything.
5 Replies - SRO Main - Discussions / Questions
Label aktualisieren
Hallo leute , ich m÷chte mein Leben in einem online Spiel in mienem Gui anzeigen. Ich lese die Momory aus und dann zeigt er das an aber wenn sich...
11 Replies - AutoIt
Run - Label?
Hallo an alle Pvpers, Ich hab in meiner GUI ein Label dass anzeigen soll wieviele Runs bisher gemacht wurden. Dies soll immer erneuert werden...
3 Replies - GW Bot Discussions / Questions
Changing System Text ...
I want to change when it says ... your wife is online ... where do i find that quote ? i looked in stress.ini ... not they :S
9 Replies - CO2 Main - Discussions / Questions
Changing Text on Blacksmith/Soul Alchemist
i was able to change the 18% on soul and blacksmith talismen using WinHex and also changing Coppers +1 ~ +3 to +7 ~ +9 but doesnt work. i upgraded a...
2 Replies - Dekaron



All times are GMT +1. The time now is 02:17.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.