# Tuesday, October 05, 2004

Blogging from beside the seaside!

Thanks to an administrative blunder in a European Union statistics report, I've found out that I actually live nearer the seaside than I thought, it seems Wales has disappeared :-)

 

Eurostat yearbook 2004

More details on the BBC News site

#    Comments [1] |
# Saturday, October 02, 2004

Some new OpenNETCF code

I've uploaded to our online source browser some of the new code which will feature in the next Smart Device Framework release. This includes a new library for WindowsCE specific functionality, designed to match the new functionality available in the Microsoft.WindowsCE.Forms assembly in the .NET Compact Framework v2.0 which is currently in Beta with Visual Studio 2005.

For Smartphone developers this includes the InputModeEditor which allows you to set a specific input mode for an edit control. Therefore when the control receives focus, the required input mode is automatically selected for the user - useful for numeric only fields or a field where you want to capture some form of text but know that T9 would be inappropriate.

For Pocket PC 2003 Second Edition the SystemSettings class allows you to easily change the screen orientation with a single statement:-

SystemSettings.ScreenOrientation = ScreenOrientation.Angle90;

There are also some changes to existing classes - specifically the RegistryKey has had a number of useful changes:-

  • ToString now matches the behaviour on the full .NET Framework (In the current release there is a subtle difference in the format of the string returned)
  • CreateSubKey allows you to create volatile registry keys on supported Windows CE 5.0 systems.
  • GetValue now correctly returns DWORD values as an Int32 rather than UInt32, this is now consistent with the desktop and makes life a lot easier.
  • We have a full implementation of GetValueKind and the RegistryValueKind enumeration - this functionality is part of the full .NET Framework v2.0 Beta but we are making it available now for .NETCF v1.0

All of this code is currently available in the source tree which you can browse online. Object model documentation has also been updated in the online library - which now exceeds 6000 individual pages. Expect to see all this code built into the next binary release.

#    Comments [0] |
# Friday, September 17, 2004

New Visual Studio 2005 edition announced

One of the stumbling blocks to getting into .NETCF development today is that the only supported tool for development is Visual Studio 2003 Professional or higher.

Microsoft announced today at VSLive a new addition to the Visual Studio family in the 2005 version - Visual Studio Standard Edition. This will be a significantly cheaper version of Visual Studio but will include the full device development experience with both VB.NET and C# for managed code and C++ for native code.

A more detailed comparison of the editions is available here:-

http://lab.msdn.microsoft.com/vs2005/productinfo/productline/default.aspx

The full press release can be viewed here:-

http://www.microsoft.com/presspass/press/2004/sep04/09-13VSLiveOrlandoPR.asp

#    Comments [0] |
# Thursday, September 09, 2004

Keep your Smartphone backlight on

If your application involves displaying screen content you probably have come across the issue where the screen backlight turns off after a few seconds of no keypresses. You can override this behaviour in your application using a couple of underdocumented API Power-Management functions. Here is a VB.NET snippet for .NETCF to keep the backlight on:-

Namespace OpenNETCF.WindowsCE.Forms

 

Public Class Backlight

 

'ensure the power requirement is released

Protected Overrides Sub Finalize()

Release()

End Sub

'handle to the power requirement

Private handle As IntPtr

 

Private Enum PowerState

PwrDeviceUnspecified = -1

'full on

D0 = 0

'low power

D1 = 1

'standby

D2 = 2

'sleep

D3 = 3

'off

D4 = 4

PwrDeviceMaximum = 5

End Enum

 

'keep the backlight lit

Public Sub Activate()

'request full power

handle = SetPowerRequirement("BKL1:", PowerState.D0, 1, IntPtr.Zero, 0)

End Sub

 

'release power requirement

Public Sub Release()

If handle.ToInt32() <> 0 Then

Dim result As Integer

result = ReleasePowerRequirement(handle)

handle = IntPtr.Zero

End If

End Sub

Private Declare Function SetPowerRequirement Lib "coredll.dll" (ByVal pvDevice As String, ByVal DeviceState As PowerState, ByVal DeviceFlags As Integer, ByVal pvSystemState As IntPtr, ByVal StateFlags As Integer) As IntPtr

Private Declare Function ReleasePowerRequirement Lib "coredll.dll" (ByVal handle As IntPtr) As Integer

End Class

End Namespace

Thanks to Paul O'Brien from MoDaCo for inspiring and helping test the code.

#    Comments [0] |

New tool for Visual Studio help integration

Creating help files which seamlessly integrate with Visual Studio 2003 is a pain. Microsoft have released a Help Integration Wizard (Beta). This is designed to walk through the process of creating a setup which will integrate a HTML Help 2.0 file with Visual Studio.

Currently to integrate your own help you either have to get down and dirty and edit the tables of data within an .MSI installer, or use a third-party tool (H2Reg) to register the help collection without using an MSI installer. The first method is documented with the Visual Studio Help Integration Kit but is by no means clear, and if you start making changes to your .MSI project you generally have to start all over again.

I've downloaded and begun to test the wizard and it looks promising, however it appears to have a few issues with the help files generated by the latest version of NDoc (1.3b1a). Hopefully this can be overcome either by tweaking the options in NDoc or by some manual editing of the generated files. When I find a solution I'll post again here.

Read about the tool (and download the beta) here:-

http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dv_vstechart/html/integration_wizard.asp

 

[Update - It appears it's not particularly new, just well hidden! ]

#    Comments [1] |
# Thursday, August 12, 2004

Upcoming Smart Device Chat

There is a smart device programming chat starting in about 45 minutes from now:-

MVP chat: .NET Compact Framework and Smart Device Programming
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 .NETCF.

August 12, 2004
10:00 - 11:00 A.M. Pacific time
1:00 - 2:00 P.M. Eastern time
17:00 - 18:00 GMT


Event Reminders


OutlookAdd to Outlook Calendar
FriendTell a Friend

#    Comments [0] |
# 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.

#    Comments [0] |
# 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.

#    Comments [0] |
# 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

#    Comments [0] |
# 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).

#    Comments [3] |
# 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!

#    Comments [0] |
# 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.

#    Comments [0] |
# 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.

#    Comments [0] |
# 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;

}

#    Comments [2] |
# 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... :-)

#    Comments [0] |

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!

#    Comments [0] |

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.

#    Comments [0] |