Digital clock for windows appliction
-
Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri
-
Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri
See the text box above? Yes... good. Now, type in the work clock. In the combo box to it's right, select Articles. Then click the Go button. WOW! Always search CP articles before posting questions of this type.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri
hi Ch.Gayatri Subudhi, Try it.. Multipurpose Digital Clock Control using .NET[^]
R RajaGuru
-
Hi , I need sample link for digital clock for a windows application which is applied and set as per the system timing.If Somebody knows plz help me out.Thanks in advance. Thanks and Regards Ch.Gayatri
hey Ch.Gayatri Subudhi just put a timer and label in ur windows form name them as tmrTime and lblTime in form's load event set
tmrTime.Interval=1000;
tmrTime.Enabled=true;following is timer's tick event and here we update time in label
public void TmrTimeTick(object sender, EventArgs e)
{
lblTime.Text = DateAndTime.Now.ToLongTimeString();
} -
See the text box above? Yes... good. Now, type in the work clock. In the combo box to it's right, select Articles. Then click the Go button. WOW! Always search CP articles before posting questions of this type.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)Thanks for your awesome suggestion..... Thanks and Regards Ch.Gayatri
-
hey Ch.Gayatri Subudhi just put a timer and label in ur windows form name them as tmrTime and lblTime in form's load event set
tmrTime.Interval=1000;
tmrTime.Enabled=true;following is timer's tick event and here we update time in label
public void TmrTimeTick(object sender, EventArgs e)
{
lblTime.Text = DateAndTime.Now.ToLongTimeString();
}Thanks for your concern.My code is working nice now. Inform1.cs: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace clock { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { getTime(); } private void timer1_Tick(object sender, EventArgs e) { textBox1.Text = DateTime.Now.ToString("HH:mm:ss"); } public string getTime() { string TimeInString = ""; int hour = DateTime.Now.Hour; int min = DateTime.Now.Minute; int sec = DateTime.Now.Second; TimeInString = (hour < 10) ? "0" + hour.ToString() : hour.ToString(); TimeInString += ":" + ((min < 10) ? "0" + min.ToString() : min.ToString()); TimeInString += ":" + ((sec < 10) ? "0" + sec.ToString() : sec.ToString()); return TimeInString; } } } and in design of form private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Timer timer1; working fine With Regards Ch.Gayatri