Search results for: “default.aspx”

  • Bluetooth Comparison

    Now that the dust has settled on MEDC, I’m thinking about how to move forward with the Bluetooth library. I had essentially put development on hold when I first heard that Microsoft were preparing their own source package prior to MEDC. When it was released, I was a little disappointed in their functionality (and compatibility) so I’ve decided to press on improving the Bluetooth.NET library. It’s going to take a few weeks to put together the next version, one key aim is to synchronise the source, samples, documentation and binaries with this next release, some of the previous releases have been binary only.


    In the meantime here is a comparison of the functionality available today in the widely available Bluetooth libraries/SDKs:-
















































































































































































      Managed libraries Native code SDKs
      Bluetooth.NET Microsoft Windows Embedded Source Tools for Bluetooth Technology High-Point BTAccess Microsoft Windows CE SDK Broadcom SDK
    Bluetooth Functionality  
    Toggle Radio * *   *  
    Device Discovery *   * * *
    Service Discovery     * * *
    Client Sockets * * * * *
    Server Sockets * * * * *
    COM Port mapping *   * * *
    Bluetooth Stacks  
    Microsoft Stack * *   *  
    Broadcom Stack     *   *
    Runtimes  
    .NET v1 *      
    .NET v2 *    
    .NETCF v1 *   *
    .NETCF v2 * *  
    Platforms  
    Pocket PC 2002     *   *
    Windows CE.NET 4.2 *     *  
    Windows Mobile 2003 *   * * *
    Windows CE 5.0 * *   *  
    Windows Mobile 5.0 * *   *  
    Windows XP (SP1 and above) *     *
    Package features  
    Help documentation *   * * *
    Source code * *      
    Sample projects *     *  
    Price FREE FREE $750 FREE $1,395

    Obviously your feedback will help shape the library, so what are the key features you’d like to see added or improved?

  • SPB Clone Review

    I’ve briefly mentioned SPB Clone here before as a method of deploying software across the enterprise. Fellow MVP Darryl Burling has completed a review of the product over at GeekZone which I recommend you read if you are facing the problem of deploying the same software across a large number of devices.


    http://www.geekzone.co.nz/content.asp?contentid=4252

  • System.Net.IrDA for the desktop (Part 2)

    Following my previous post, I did some further development to the code to make it fully match the .NETCF assembly (yes, in my haste I’d missed a few properties and cut a couple of corners). So now I have compiled a System.Net.IrDA.dll assembly which has exactly the same classes and methods as is available in device projects. So you can easily move device code over to Tablet and laptop PCs.


    Download the DLL here (zip 7kb)


    The package includes just the dll and xml documentation. The next task for the project is to build an installer for both the source and binaries…


    This was a useful learning experience since I’ve based the Bluetooth code on the existing model of the IrDA library, so it was useful to spend some time studying this particular library and the classes it contains.


    The functionality is now part of 32feet.NET a library for personal area networking for .NET. The downloads are here:-


    https://inthehand.com/wp-content/uploads/folders/releases/default.aspx

  • Fixing ComboBox bugs…

    The standard ComboBox in NETCF has a couple of “issues”, however it’s possible to workaround them with a bit of tweaking. I rolled together a number of these fixes into a ComboBoxEx class. Heres the code (C#), I hope this (with a few more missing features) will be in the next SDF build with designer support like our other controls:-


    namespace OpenNETCF.Windows.Forms


    {


          /// <summary>


          /// Extended ComboBox control.


          /// </summary>


          public class ComboBoxEx : ComboBox, IWin32Window


          {


                //windows messages


                private const int WM_SETREDRAW = 0x0b;


                private const int CB_SETCURSEL = 0x014E;


                private const int CB_DELETESTRING = 0x0144;


                private const int CB_INSERTSTRING = 0x014A;


     


                //native window handle


                private IntPtr m_handle;


     


                //databound collection


                private IBindingList thebindinglist = null;


     


                //is display updatable?


                private bool m_updatable = true;


     


                /// <summary>


                /// Gets the window handle that the control is bound to.


                /// </summary>


                public IntPtr Handle


                {


                      get


                      {


                            if(m_handle == IntPtr.Zero)


                            {


                                  this.Capture = true;


                                  m_handle = Win32Window.GetCapture();


                                  this.Capture = false;


                            }


     


                            return m_handle;


                      }


                }


     


                // Redraw code courtesy of Alex Feinman – http://blog.opennetcf.org/afeinman/PermaLink,guid,9305a1d9-e24e-4310-89e2-f80808076a37.aspx


     


                /// <summary>


                /// Maintains performance when items are added to the <see cref=”ComboBoxEx”/> one at a time.


                /// </summary>


                public void BeginUpdate()


                {


                      m_updatable = false;


     


                      Win32Window.SendMessage(this.Handle, WM_SETREDRAW, 0, 0);


                }


     


                /// <summary>


                /// Resumes painting the <see cref=”ComboBoxEx”/> control after painting is suspended by the <see cref=”BeginUpdate”/> method.


                /// </summary>


                public void EndUpdate()


                {


                      m_updatable = true;


                      Win32Window.SendMessage(this.Handle, WM_SETREDRAW, 1, 0);


                }


     


                //ComboBox doesn’t support ItemChanges in a datasource implementing IBindingList


                //The following workaround forces the list to update if an item is changed


     


                //data source has changed


                protected override void OnDataSourceChanged(EventArgs e)


                {


                      //remove event handler


                      if(thebindinglist != null)


                      {


                            thebindinglist.ListChanged-= new ListChangedEventHandler(ComboBoxEx_ListChanged);


                            //reset our handle to the bound data


                            thebindinglist = null;


                      }


     


                      //get the underlying ibindinglist (if there is one)


                      if(this.DataSource is IListSource)


                      {


                            IList thelist = ((IListSource)this.DataSource).GetList();


                            if(thelist is IBindingList)


                            {


                                  thebindinglist = (IBindingList)thelist;


                            }


                      }


                      else if(this.DataSource is IBindingList)


                      {


                            thebindinglist = (IBindingList)this.DataSource;


                      }


                     


                      if(thebindinglist != null)


                      {


                            //hook up event for data changed


                            thebindinglist.ListChanged+=new ListChangedEventHandler(ComboBoxEx_ListChanged);


                      }


                     


                      base.OnDataSourceChanged (e);


                }


     


                //called when a change occurs in the bound collection


                private void ComboBoxEx_ListChanged(object sender, ListChangedEventArgs e)


                {


                      if(m_updatable)


                      {


                            if (e.ListChangedType == ListChangedType.ItemChanged)


                            {


                                  //update the item


     


                                  //delete old item


                                  Win32Window.SendMessage(this.Handle, CB_DELETESTRING, e.NewIndex, 0);


                                  //get display text for new item


                                  string newval = this.GetItemText(this.Items[e.NewIndex]);


                                  //marshal to native memory


                                  IntPtr pString = MarshalEx.StringToHGlobalUni(newval);


                                  //send message to native control


                                  Win32Window.SendMessage(this.Handle, CB_INSERTSTRING, e.NewIndex, pString);


                                  //free native memory


                                  MarshalEx.FreeHGlobal(pString);


                            }


                      }


                }


     


                /// <summary>


                /// Get or Set the selected index in collection.


                /// </summary>


                /// <remarks>Overridden to overcome issue with setting value to -1 (http://support.microsoft.com/default.aspx?scid=kb;en-us;327244)</remarks>


                public override int SelectedIndex


                {


                      get


                      {


                            return base.SelectedIndex;


                      }


                      set


                      {


                            if(value == -1)


                            {


                                  Win32Window.SendMessage(this.Handle, CB_SETCURSEL, -1, 0);


                            }


                            else


                            {


                                  base.SelectedIndex = value;


                            }


                      }


                }


     


          }


    }



     


    So whats in the above code? Well it integrates Alex Feinman’s recent tip to implement Begin/EndUpdate methods to suspend redrawing when populating the control.


    Secondly if works around a bug in the DataBinding support for ComboBox. If you make an edit to an existing item in the bound collection the combo wont normally update (It does correctly react to additions and deletions).


    Thirdly it overcomes a known issue with resetting the selected index property (by assigning -1) which normally has to be done twice to take effect – details in this KB article – Thanks to Tim Wilson for posting this KB on the newsgroup.


    As a Bonus I’ve added a Handle property so you can get at the native control handle – which in conjunction with Win32Window methods allows you to tweak other aspects of the control.


    UPDATE: Changed the databinding code to update a single item via P/Invoke rather than refreshing the list. Changed the SelectedIndex to set via P/Invoke – avoids raising the SelectedIndexChanged event.

  • 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

  • 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! ]

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

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

  • Fake Goods

    A new article on using the Virtual Radio feature of the 2003 generation of device emulators is now available at MSDN


    http://msdn.microsoft.com/mobility/default.aspx?pull=/library/en-us/dnppcgen/html/callevents.asp


    It shows how to simulate incoming calls and SMSs using the Fake RIL on the emulator.

  • Find your way around the API maze

    This Win32
    to .NET mapping article
    on MSDN caught my eye recently. It’s aim is to show the
    mapping between Win32 API functions and their managed equivalent. This is for the
    full desktop framework, would you be interested in a Compact Framework equivalent?

    Since Compact Framework development generally requires a fair bit of P/Invoke its
    useful to know which functions are already available in managed form (its very easy
    to start P/Invoking functions to find an equivalent is already available in the Compact
    Framework or an OpenNETCF library). It would also be useful to show which functions
    can and cannot be P/Invoked directly…