Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 08:21

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

Advertisement



C# Label text changing each second

Discussion on C# Label text changing each second within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
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 04/02/2010, 23:43   #2

 
x]vIrus[x's Avatar
 
elite*gold: 37
Join Date: Apr 2004
Posts: 2,154
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 04/03/2010, 11:19   #3

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
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 04/03/2010, 12:35   #4
 
waldi_'s Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 440
Received Thanks: 352
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 04/05/2010, 12:25   #5

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
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


Similar Threads Similar Threads
changing chat text color ?
07/31/2012 - Silkroad Online - 5 Replies
is it possible to change chat text color ? i tried to search but i didn't find anything.
Label aktualisieren
04/21/2010 - AutoIt - 11 Replies
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 dieser Wert ändert zeigt er es den unveränderten Wert an. Also möchte ich es jede halbesekunde oder so aktualiesieren lassen. wie mache ich das ?
Run - Label?
02/22/2010 - GW Bots - 3 Replies
Hallo an alle Pvpers, Ich hab in meiner GUI ein Label dass anzeigen soll wieviele Runs bisher gemacht wurden. Dies soll immer erneuert werden nachdem "/resign" eingegeben wurde. ICh dachte schon an: Funktioniert aber nich. Oder was ich mir auch noch gedacht habe war: Kann mir jmd helfen?
Changing System Text ...
05/25/2008 - Conquer Online 2 - 9 Replies
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
Changing Text on Blacksmith/Soul Alchemist
12/18/2007 - Dekaron - 2 Replies
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 weapon hoping it would go str8 to +7 but it didnt lol. Also with the 18% i changed the 1 ro 9, so had 98% when i hover my mouse over the Soul of Alchemist. But when i insert an item and the Soul of Alchemist it doesnt go up by 98%. Just thought id let everyone know you can change the Text on everything using WinHex but still trying to find a way...



All times are GMT +2. The time now is 08:21.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.