Click here to Skip to main content
6,295,667 members and growing! (12,279 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Mobile Development » General     Advanced

Decimal UpDown Control for Pocket PC

By S Sansanwal

This control is used for decimal up-down operation in compact framework
Windows, .NET CF, Mobile, Visual Studio, Dev
Posted:23 Aug 2006
Views:11,979
Bookmarked:8 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
4 votes for this article.
Popularity: 2.26 Rating: 3.75 out of 5

1

2
1 vote, 25.0%
3

4
3 votes, 75.0%
5

Sample Image - DecimalUpDownCF.jpg

Introduction

I recently had a requirement of having a decimal Up Down control for a Pocket PC application. I was surprised to find that even though there is a numeric up down like one found in Form application it lacks the �DecimalPlaces� property. I tried to look on web as a good developer J but I couldn�t find one for this requirement. Finally, I have written one for this application treating this as a learning exercise.

Solution

Please note this article is not about how to create a user control. It just update you how to use this control.

For this solution, I have created a composite user control which uses 1 textbox, 2 pictures and a timer. The textbox is used for displaying the value of decimal updown control. The picture controls are used for scrolling the value and timer is used to increase\decrease the value when user keeps the mouse pressed on the pictures. This control also expose got_focus and lost_focus events using a new event ChangeFocusEvent. You could use this as a template to expose other events as per your requirement.

 

How to use this control

Create a new pocket PC project and right click on the tools in the left hand side of IDE. Select �Choose Items� and add this control by browsing to this control RELEASE folder. You could now able to see a DecimalUpDownCF control in the toolbar. Drag and drop it on your application Window form. At this stage you could change the properties � Maximum, Minimum, Increment and Value in same way as of a standard Numeric UpDown control. If you go to the events list of this control, you would find �ChangeFocusEvent� This event expose the Focused property which indicates if control have Got the focus or lost the focus.

Please find the sample code to use this event and to make any changes as per your requirement. Happy programming.

 

 

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

S Sansanwal


Member

Occupation: Architect
Location: Australia Australia

Other popular Mobile Development articles:

  • Writing Your Own GPS Applications: Part 2
    In part two of the series, the author of "GPS.NET" teaches developers how to write GPS applications suitable for the real world by mastering GPS precision concepts. Source code includes a working NMEA interpreter and sample high-precision application in C# and VB.NET.
  • Writing Your Own GPS Applications: Part I
    What is it that GPS applications need to be good enough to use for in-car navigation? Also, how does the process of interpreting GPS data actually work? In this three-part series, I will cover both topics and give you the skills you need to write a commercial-grade GPS application.
  • Learn How to Find GPS Location on Any SmartPhone, and Then Make it Relevant
    A step by step tutorial for getting GPS from any SmartPhone, even without GPS built in, and then making location useful.
  • Pocket 1945 - A C# .NET CF Shooter
    An article on Pocket PC game development
  • iPhone UI in Windows Mobile
    It's an interface that works with transparency effects. As a sample I used an interface just like the iPhone one. In this tutorial I am explaining how simple is working with transparency on Windows Mobile.
Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
  (Refresh) 
-- There are no messages in this forum --

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 23 Aug 2006
Editor:
Copyright 2006 by S Sansanwal
Everything else Copyright © CodeProject, 1999-2009
Web19 | Advertise on the Code Project