Blog

  • 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.

  • 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;


    }

  • 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.

  • 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);

  • 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

  • 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.

  • 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.


     

  • Friday Fun: Automating Windows Media Player from .NETCF

    Windows Media Player for Pocket PC (and Smartphone) doesn’t have a true object model like it’s desktop cousin, so the ability to use it from your own code is limited. However there is an undocumented method of sending commands to Windows Media Player via a specific series of Windows Messages. These are actually hidden away in the Registry under the curiously named section “Pendant Bus”.


    Therefore I put together a simple dll which creates an instance of Media Player if one is not already running, and sends messages to it, to allow you to play, pause, move back and forward through the playlist or adjust the volume. The code requires the Smart Device Framework which is used to P/Invoke a couple of Windows methods e.g. SendMessage. A typical method looks like:-

    /// <summary>

    /// Skips to the next track in the playlist.
    /// </summary>
    public void NextTrack()
    {
    Win32Window.SendMessage(hwnd, 32972, IntPtr.Zero, 0);


    }

    There are some limitations in the code I’ve posted here – it doesn’t start the player with a specific file queued up (this would require a very simple overload to the constructor).


    There are currently no events and it is not possible to get information back from the player such as track name, elapsed time etc. I’m still investigating whether such information is output in any way which can be captured. This code should work with all Windows Mobile 2003 devices (inc Smartphone) and possibly earlier Pocket PCs but these have not been tested yet.


    Download the full code project with Pocket PC sample application here.