# Wednesday, August 11, 2004

Casey posts detailed .NETCF v2.0 base class library changes

The poster announced in the previous post gives a fairly high-level view of API changes between versions of the .NET Compact Framework. Casey Chesnut has posted a very detailed member-by-member comparison of v1 and v2 of the Compact Framework. This includes some exciting stats of the number of types, methods and properties supported in the base class libraries, and a complete alphabetical list of types.

#    |
# Saturday, July 31, 2004

New .NET Compact Framework poster available for download

Its been a bit of a moving target but I've finally released a current version of the .NET Compact Framework Versions poster. The aim is to show a fairly detailed view of the functionality available in .NET Compact Framework v1.0, that which is expected in v2.0, and the functionality available in the next version of Windows Mobile. This is contrasted against the functionality available now in the OpenNETCF Smart Device Framework v1.2.

The poster is divided into two main sections, the functionality which is unique to the Smart Device Framework is down the righthand side in the blue section. The increasing functionality in the .NET Compact Framework from v1.0, v2.0 and functionality specific to future Windows Mobile devices is arranged down the left in increasing intensities of green.

A number of our Smart Device Framework classes are not wholly unique and either extend those available in the Compact Framework v1.0, or directly match those which will form a part of the Compact Framework v2.0. These are shown on the diagram in Blue - To avoid naming conflicts these have the "Ex" prefix on their name, and our root namespace is "OpenNETCF" as apposed to "System" or "Microsoft".

All of the future functionality is subject to change since these are based on functionality which has been announced and things may be added, removed or re-architected between now and the Compact Framework v2.0 (and future Windows Mobile) being released. Therefore it is likely that this diagram will be periodically updated to keep it accurate. Of course it is likely that during this time the Smart Device Framework may gain additional functionality too, so this just represents a current snapshot of the functionality available to developers. It is worth noting that the Compact Framework has a growing community of third-party controls and components which are not included on this diagram, many of these also add functionality to the v1.0 framework which either pre-empts v2.0 or future Windows Mobile specific functionality, or adds whole new functionality than that show on this diagram. There is a section in the Wiki which lists some of these (and you are welcome to contribute to the wiki)

.NET Compact Framework Versions Poster .NET Compact Framework Versions (PDF 422kb)
Compares the functionality available in the .NET Compact Framework v1.0, v2.0, Windows Mobile v.Next and the OpenNETCF Smart Device Framework.
Since .NET Compact Framework v2.0 and Windows Mobile v.Next are not yet released these details are subject to change and are based on recent public announcements and the functionality available in Visual Studio 2005 Beta 1.

#    |
# Tuesday, July 20, 2004

Using the Smart Device Framework?

If you are using the Smart Device Framework in your software then why not take up Neil's offer of free publicity in an upcoming webcast.

Chris and Neil will be giving a webcast next Wednesday, and you can submit your Logo or Screenshots of your app to Neil for a quick showcase of all the cool things people are doing with OpenNETCF code. Full details here:-

http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032254427&Culture=en-US

#    |
# Sunday, July 18, 2004

NDoc with Visual Studio 2005 Beta1

I saw this post by Steve and realised that I hadn't tried NDoc with Whidbey B1 yet. I was able to get it to work flawlessly, though perhaps my particular configuration is unusual.

I'm running inside a Virtual PC image, into this I added an absolute bare-bones installation of XP Pro, I've applied SP2 RC2 but no other updates - at this moment it doesn't have the .NET Framework v1,1 installed. Next I installed Whidbey Beta1 with pretty much all the options including the MSDN documentation. I built a very simple C# Pocket PC project, usual hello world stuff, added the configuration option to build xml documentation and built the project.

I then went off to the NDoc website to download the v1.3 Beta installer. However this checks for .NET v1.1 and won't install without it. Getting worried that installing v1.1 after v2.0 B1 might cause problems I promptly backed out. My alternative was to share a folder on the host PC and copy across NDoc 1.3 Beta from there. The program loaded flawlessly against the v2.0 Beta1 framework. I then had no problems documenting my .NETCF v2.0 project. So I guess this is the key, if NDoc is running against the v1.1 framework it will choke when faced with a v2.0 assembly, but I don't intend to check this theory just yet (It's taken long enough to get this virtual machine set up just the way I want it!

The solution should be to add a config file for NDoc which includes the following XML to prefer the v2.0 framework:-

<configuration>
   <startup>
      <supportedRuntime version="v2.0.40607" />
   </startup>
</configuration>

Save this file as:- c:\program files\NDoc 1.3\bin\net\1.1\NdocGui.exe.config You may need to adjust this path depending on where you installed NDoc.

The next step will to be to test with some more complex projects (like the Smart Device Framework).

#    |
# Wednesday, July 14, 2004

Write cool .NETCF Code and win prizes

Chris has announced our Coding Competition on his blog. This is a chance to win some cool prizes including a Smartphone Dev Kit, Visual Studio, Pocket PC, Compact Framework books and more!

Looking forward to seeing the cool entries we are anticipating!

#    |
# Thursday, July 08, 2004

.NET Compact Framework / Visual Studio for Devices Chat starts soon

This months chat with the Visual Studio for Devices team is due to start in just under half an hour, logon here and bring your tricky questions for the product team members.

Full details along with other online chats are listed at MSDN.

#    |
# Monday, July 05, 2004

Tech Ed 2004 Europe Highlights

Its been a few days since Tech Ed in Amsterdam finished, and I'd intended to post a few of the highlights from the conference:-

Keynote

During the Keynote every delegate was given a handmade drum and encouraged to play along. This was certainly the most unusual conference idea I've ever witnessed. James Pratt and Steve Lombardi graced the stage in Smartphone and Pocket PC costumes to give their demonstration, hats off for them to be able to write and run code with their arms in a polystyrene suit!

Visual Studio now has a new tier of products. The Express lineup represents the entry level products for individual languages (C#, VB.NET, C++) and Web Developer. Also Sql Server Express replaces MSDE as a free database engine based on the Sql Server engine. These products are aimed at learners, hobbyists and academics who want a quick and simple tool to get started with learning managed development, and provide a stepping stone up to more full featured products. The Express products won't include the ability to developer with the Compact Framework (See a feature comparison here - http://lab.msdn.microsoft.com/vs2005/productinfo/productline/default.aspx)

Mappoint

Mappoint Location Server which was presented at MDC in San Francisco eariler in the year has been released in Europe. There are a couple of plugins for european operators including O2, with more hoped to follow in due course. Also the Mappoint web service will be getting a couple more mapping providers soon to add coverage for Greece and Australia. Steve Lombardi also indicated that they were looking to increase coverage in Asia and Eastern Europe. Another feature which will be added to Mappoint at some time in a future release is the ability to plot walking directions (currently the system plots routes based on driving), this means it will plot routes that can go the wrong way down one-way roads and take shortcuts through parks etc.

Windows Mobile

Neil Enns gave a great talk on POOM which revealed some of the features due in the next version of Windows Mobile to the COM object model. Neil even had handouts printed with the API showing these new interfaces. Probably the most important feature described was the ability to add custom fields right into the POOM store.

Robert Levy demonstrated separately some code using the Managed POOM APIs which will be in the future platform. This includes the functionality we know and love from POOM along with the ability to send Email and SMS messages. Along with managed POOM there will be managed APIs for Telephony, Configuration and Camera.

Ask The Experts

We got a number of comments on the Tablet PC booth that there wasn't an area for Windows Mobile or .NETCF developer questions. This was a shame considering the conference included an MDC strand. We actually had the biggest Ask The Experts booth for Tablet PC, but there were no other mobility topics covered. The only Smart Device was a 10ft long radio controlled airship teathered to the Visual Studio booth, which I thought was really cool :-)

Windows Mobile Pavillion

On the Windows Mobile pavillion there were a number of interesting devices on show. Sprint were showing the Voq and its associated developer kit. Orange had a couple of C500 devices, which are incredibly small and include Bluetooth and a camera and are running Windows Mobile 2003 Second Edition. Motorola had both the MPx220 smartphone, which has a 1.3 megapixel camera with flash and Bluetooth, and the MPx device which is a Pocket PC Phone Edition which can be opened in both portrait and landscape orientations. This is an incredibly versatile device which is much smaller in real life than you might imagine, however more bulky than a smartphone device. Tom Tom were demonstrating the Smartphone version of their Navigator product which is due for release in September. There will be an update to the SDK to add support for this version. Details on functionality have not be released yet and the device at the show was running a rolling demo, not a working version.

Bags and Goodies

The conference bag was gigantic, a bright orange PVC affair which made delegates look like paper-boys. Thankfully during the keynote we were given instructions on how to wear the bag, given as a spoof of an airplane safety announcment. Now that electronic copies of all the slides, demos, sdks etc are readily available I wonder why it is necessary to carry quite that weight of stuff around. Personally I'd rather have a few DVD-ROMs with all of the content on. However I thought including the Compact Framework pocket guide was a really neat way of introducing delegates to managed development for devices.

Venue and Transport

The venue was enormous and one of these exhibition centres which is like a maze inside. Mind you there are some advantages in getting lost in some of the quieter areas, there is generally more snack food left! Transport to and from Schipol airport was provided for all attendees along with a travel pass for the entire week for all delegates. This allowed unlimited use of the metro, tram and bus system around Amsterdam.

#    |
# Friday, June 18, 2004

Automatic Capitalisation Of Words In A Text Box

A question arose recently on the newsgroup of how to automatically capitalise the first letter of a word in a text box, e.g. by activating the shift key on the soft keyboard. Since there is no API for the SIP to do this the workaround is to simulate a mouse click over the position of the Shift key in the soft keyboard.

An alternative method is to handle the TextChanged event on the TextBox and add some logic to capitalise words as the text is entered. The advantage here is that it is not dependent on a specific SIP being in use:-

private void textBox1_TextChanged(object sender, System.EventArgs e)

{

  //start with true as the first character should always be upper case

  bool makeUpper = true;

  //get the current text as a char array

  char[] oldText = textBox1.Text.ToCharArray();

  //create a new char array the same size for the new text

  char[] newText = new char[oldText.Length];

  //for each char

  for(int iChar = 0; iChar < oldText.Length; iChar++)

  {

    if(makeUpper)

    {

      //make the character upper-case and reset the flag

      newText[iChar] = Char.ToUpper(oldText[iChar]);

      makeUpper = false;

    }

    else

    {

      //copy the character as-is

      newText[iChar] = oldText[iChar];

    }

    //if it's a space the next character should be upper-case

    if(oldText[iChar] == ' ')

    {

      makeUpper = true;

    }

  }

  //assign the new value

  textBox1.Text = new String(newText);

  //position the cursor at the end of the text

  textBox1.SelectionStart = textBox1.Text.Length;

}

#    |
# Tuesday, June 15, 2004

Do our APIs give the same reaction?

Eric King posted this hilarious picture to his blog showing the .NET Framework Standard Library Annotated Reference as you've probably never seen it before. I wonder if OpenNETCF class libraries get the same reaction from developers... :-)

#    |

Tech-Ed 2004 Amsterdam

I've been invited to help out on the Tablet PC Ask-The-Experts booth at Tech-Ed Europe. This promises to be a pretty cool conference with some great mobility content. I'm definately looking forward to it!

#    |

UK Tablet PC ISV Challenge - Judging Complete

In the last couple of weeks I've been down to Microsoft's UK headquarters in Reading as a member of the judging panel for this interesting Tablet PC competition.

Entrants were given the ability to purchase a subsidised Tablet PC and develop an application which they felt was perfect for the Tablet PC platform. The first week we looked over many entries aimed at a whole range of vertical markets, this was reduced to a shortlist of 10 entrants who came in this week to give a short presentation to the panel and get a chance to explain their projects in more detail and demonstrate some of the Tablet PC specific features.

There can be only one winner of course, they will receive the chance to travel to Microsoft's HQ in Redmond and meet with the Tablet PC team. I can't tell you who that is yet as it will be announced at the Tablet PC event in Heathrow next Tuesday. It was a really interesting experience to see the range of things people are planning to use Tablet applications for.

#    |
# Sunday, June 13, 2004

Vibration and Pocket PC devices

A number of Pocket PC devices support Vibration as an alert method, most (but not all) are Phone Edition devices. The Vibrate class in the OpenNETCF.Notification library is specific to Smartphone devices only.


However the good news is that the Vibrate functionality is implemented as a notification Led so you can control the vibration using the Led class. One of the peculiarities of the NLed API is that the collection of Leds may contain gaps, for example some devices contain a notification Led at position 0 and a vibration device at position 5. There is no way to programmatically determine the index of the vibration device, you can only determine the overall count of devices. Also the vibration device can only be turned on or off so the Blink setting behaves exactly as On would.


On the HTC Himalaya the vibration device is implemented at index 1 and the following code can be used to turn on and off the vibration:-


OpenNETCF.Notification.Led l = new OpenNETCF.Notification.Led();


//turn on vibration


l.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.On);


//turn off vibration


l.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.Off);

#    |
# Saturday, June 12, 2004

Vibration and Pocket PC devices

A number of Pocket PC devices support Vibration as an alert method, most (but not all) are Phone Edition devices. The Vibrate class in the OpenNETCF.Notification library is specific to Smartphone devices only.

However the good news is that the Vibrate functionality is implemented as a notification Led so you can control the vibration using the Led class. One of the peculiarities of the NLed API is that the collection of Leds may contain gaps, for example some devices contain a notification Led at position 0 and a vibration device at position 5. There is no way to programmatically determine the index of the vibration device, you can only determine the overall count of devices. Also the vibration device can only be turned on or off so the Blink setting behaves exactly as On would.

On the HTC Himalaya the vibration device is implemented at index 1 and the following code can be used to turn on and off the vibration:-

OpenNETCF.Notification.Led l = new OpenNETCF.Notification.Led();

//turn on vibration

l.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.On);

//turn off vibration

l.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.Off);

 

I'll be updating the documentation to make this clearer as currently the Vibrate class is incorrectly listed as supported on Smartphone and Pocket PC Phone Edition.

#    |
# Thursday, June 10, 2004

Smart Device Programming chat starts soon!

I intended to post this slightly more in advance but have been travelling around all this week, please excuse me :-)

Chat Date: June 10th
10:00am - 11:00am Pacific Time
1:00pm - 2:00pm P.M. Eastern time
17:00 - 18:00 GMT/BST

Description: You know them from the newsgroups! You love them for their
immense knowledge! Please join these amazing Microsoft MVPs in this live
chat regarding the .NET Compact Framework and the Smart Device Programming
features of VS.NET. The .NET Compact Framework is a subset of the .NET
Framework designed to allow .NET developer to target smart devices. The
Smart Device Programming features of VS.NET allow embedded developers to
target devices running the Compact Framework.

To join this chat, please visit:
http://communities2.microsoft.com/home/chatroom.aspx?siteid=34000070

#    |
# Monday, May 24, 2004

Visual Studio 2005 Team System and new source control system

Steve Ballmer officially unveiled "Visual Studio 2005 Team System" which is a collection of tools around Visual Studio, previously code-named Burton. There's more juicy details on Korby's weblog.

Part of this is a new source control system code-named "Hatteras" which is based on SQL Server. This is used both to track work items and source code checkins, there is even an ASP.NET interface into the system, and of course full integration into Visual Studio itself.

Looking through the juicy documentation on the recently opened Team System website, one of the clear messages you get is that the system is designed for all the different roles within a team - there are tools for architecture, development, project management and testing but they all integrate together.

While none of this is specific to Smart Device development this looks like an interesting suite of technologies for any software team.

#    |
# Saturday, May 22, 2004

Want to know more about OpenNETCF.Security.Cryptography?

As Sam points out, the OpenNETCF.Security.Cryptography library was donated to the OpenNETCF codebase by fellow MVP Casey Chesnut. So a good source of information about how the library is built is Casey's original article on the subject.

The library is designed in such a way that it follows the object model of the System.Security.Cryptography namespace in the full framework. A background on the Cryptographic services in .NET can be found here in the MSDN library.

 

#    |