Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2007, 11:56 PM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating Labels in C#

I have two files. One is the form or the GUI and the other is a class which has related functionality.
Basically I am developing an avi player.

In the GUI I have a Label. In this Label I want to display the time (chrono time of the avi file i.e 00:00:00 and it keeps on increasing as the file is played)

My problem is that I am relatively new to GUI programming.
How can I dipslay this time in the Label i.e how should I update this Label to display the time. What technique should I use? Delegates or what.

Please help.

Thanks
dranne
 
Old April 6th, 2007, 07:36 AM
Registered User
 
Join Date: Sep 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

assign your string to the Text field of the label

    label1.Text = "Time String";

Good Luck

 
Old April 9th, 2007, 05:50 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh, the time field is not anything static. Its a dynamic field. The time value will have to be continously fetched.
Hope its clear now.

Can anybody help?

Thanks
dranne

 
Old April 10th, 2007, 12:37 AM
Authorized User
 
Join Date: Mar 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to erictamlam Send a message via MSN to erictamlam Send a message via Yahoo to erictamlam
Default

You need Timer Control on your form.

ERIC





Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Labels in C#???? thomaz C# 2 December 16th, 2007 01:59 PM
Vertical Labels bfoley CSS Cascading Style Sheets 2 November 26th, 2007 02:06 PM
Labels in Access taraj Access 2 May 16th, 2005 01:35 PM
Labels slgknjn Beginning VB 6 9 February 25th, 2005 04:12 PM
printing labels yami56 Access 14 April 23rd, 2004 09:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.