Ahmadreza's Notes

On Software Development

Posts Tagged ‘.Net Compact Framework

TickCount instead of millisecond in compact framework

After long absence I’m back now. Recently I wanted to develop an application for windows mobile with .Net Compact framework. In this application I need to measure elapsed time in millisecond resolution. First of all like everyone I tried to use Millisecond property of DateTime.Now static class. But it won’t work at all in .Net Compact framework even in version 3.5!

If you want to use a timer with millisecond resolution you have to use TickCount property of Environment class.

//Will be zero.

lblMillisecondVal.Text = DateTime.Now.Millisecond.ToString();

//Total milliseconds elapsed since the system started.

lblTickCountVal.Text = Environment.TickCount.ToString();

Here is an example of using TickCount Instead of Milliseconds

Advertisements

Written by Ahmadreza Atighechi

March 30, 2009 at 1:42 pm

Posted in Blog

Tagged with ,

Pocket PC Developers Resources

Currently, I’m working on Pocket PC development. During last week I’ve found interesting resources about windows mobile development with .Net compact framework. first of all Windows Mobile Team Blog would be a sophisticated resource. Moreover you could find other useful links in this weblog.

Other blogger’s web site would be good resources, like Chris Craft’s Blog. CJ’s weblog contains a series of posts for a month. For each day he wrote a post about windows mobile programming. It would be a good starting tutorial for beginners.

Another web site that could be useful is www.dotnetfordevices.com .

However, I’ll post related news and experiences during windows mobile development

Written by Ahmadreza Atighechi

October 28, 2008 at 12:07 am

Posted in Blog

Tagged with ,