Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Category list

Widget Twitter not found.

Root element is missing.X

How to change mouse cursor icon in windows mobile application

by Ahmadreza Atighechi 6. April 2009 12:28

 

Informing user about application state is one of important aspects in user experience. In windows applications mouse icon indicates one of great application states. When an application is busy mouse icon should be changed to wait cursor mode or hourglass icon. In windows application you can achieve this by changing Cursor property of any Control, Usually by changing "this.Cursor" which "this" is current form in application. See example:

 

this.Cursor = Cursors.WaitCursor;

 

Since control class in compact framework does not have Cursor property, not only developer could not change every control cursor icon but also he could not change form cursor property. So what should developer do in order to indicate application state?

There is a static class in System.Windows.Forms named Cursor and it has a property named "Current" which developer should set it to an appropriate cursor based on application state.

 

 

System.Windows.Forms.Cursor = Cursors.WaitCursor;

Or

System.Windows.Forms.Cursor = Cursors.Default;

 

Tags: ,

Blog

TickCount instead of millisecond in compact framework

by Ahmadreza Atighechi 30. March 2009 13:42

 

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

 

Tags: ,

Blog

Pocket PC Developers Resources

by Ahmadreza Atighechi 28. October 2008 00:07

 

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

Tags: ,

Blog

The information on this web site is provided "AS IS" with no warranties, and confers no rights.

Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen