PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
display time in my program
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
display time in my program
![]() |
display time in my program |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello all,
I'm trying to find the best way to display the clock all the time in my form.(WM 5.0)a should I use snapi function or maybe DateTime Class? I'm not realy sure Thanks very much in advance |
|
|
|
#2 |
|
Guest
Posts: n/a
|
DateTime.Now
-- Chris Tacke - Embedded MVP OpenNETCF Consulting Managed Code in the Embedded World www.opennetcf.com -- "avida" <avi@idnext.co.il> wrote in message news:1173180863.757523.240660@j27g2000cwj.googlegroups.com... > Hello all, > > I'm trying to find the best way to display the clock all the time in > my form.(WM 5.0)a > should I use snapi function or maybe DateTime Class? I'm not realy > sure > > Thanks very much in advance > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Create a Timer (timerUpdateTime) and set the Interval to 1000. Create a
Label (m_DateTime) and place it on your form. In the Tick event for the timer, add the following code: private void timerUpdateTime_Tick(object sender, System.EventArgs e) { m_DateTime.Text = DateTime.Now.ToString("G"); } You can set the format to whatever you want. "<ctacke/>" <ctacke[@]opennetcf[dot]com> wrote in news:u36AF2#XHHA.688 @TK2MSFTNGP03.phx.gbl: > DateTime.Now > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

