# Thursday, February 19, 2004

So what do you think of OpenNETCF?

The OpenNETCF Survey

As we are approaching our first anniversary (and so is the .NET Compact Framework itself which was officially announced last March) we are interested to understand what you think of the code, articles etc we have created so far and what you would like to see from us in the future. We would really appreciate it if you could spare a few minutes to fill in our short survey, you can fill it anonymously if you like or if you provide details you'll be entered into a draw for some secret OpenNETCF goodies - we'll announce the winner during the upcoming MDC 2004 week.

 

#    |

Microsoft Mobile Dev Con just over a month away

Kevin Lisota has just posted about his excitement for the upcoming MDC in San Francisco. It's shaping up to be a really interesting event and of course OpenNETCF will be providing an exciting session:-

"CLI345 - Developing Real-world Smart Device Applications with Visual Studio .NET 2003, .NET Compact Framework and OpenNETCF SmartDevice Framework
The .NET Compact Framework is a powerful tool for a mobile developer. To fully utilize its potential in a real-world application, a developer needs access to the native API and intrinsic Windows CE controls. OpenNETCF SmartDevice framework is designed to address these needs."
 
There will also be a number of worldwide events to follow offering MDC content nearer to you.


#    |
# Saturday, January 31, 2004

.NET Compact Framework Poster

To celebrate the upcoming release of a full featured developer poster detailing the .NET Compact Framework class hierarchy, Jon Wells is holding a giveaway for a "Poster and Coaster". This consists of the poster and a CD-Rom full of goodies from the MSDN mobility website. There is an image of the poster available here on Jon's blog.

#    |

Multiple icons in .NETCF projects

A discussion came up on the newsgroup regarding using a system tray icon from within .NETCF code and how the icons are handled. The way this is done (including in OpenNETCF's NotifyIcon control) is to use the icon of the calling assembly using the native LoadIcon function.

The tray icon needs to be a 16x16 icon, however to look right in the Programs screen the application needs a 32x32 icon too. There is some confusion of how to handle multiple icons within a .NETCF application. Adding multiple icons through embedded resources does not make these icons accessible from native functions such as LoadIcon because .NETCF does not store these icons as Portable Executable (PE) resources, instead using the .NET method with manifests. Therefore in the normal build process the only PE icon to be built into the executable will be that which is specified in the ApplicationIcon property in the project properties:-

The icon file in this case was created using Visual Studios icon editor, this contains two icons: 32x32 256 color and 16x16 256 color. You can download the sample .ico here. To illustrate which is used they contain merely a number with their size (32 and 16 respectively).

In the Start Menu / Programs the 32 icon is used to display a correctly sized icon. When the NotifyIcon is created it automatically uses the 16x16 sized image.

 

One final note about the application icon is that .NETCF executables all store their application icon with the resource identifier 32512. so a native handle to the icon of the currently executing application can be got using

        IntPtr hIcon = LoadIcon(GetModuleHandle(null), "#32512");
    

LoadIcon is within Coredll.dll and you'll find the P/Invoke details in the OpenNETCF Smart Device Framework source. When you have finished with the handle you should call DestroyIcon to free up resources used.

Sample Icon

#    |

.NETCF Performance

Alex recently posted a link in his blog to a presentation discussing the architecture of the .NET Compact Framework which has some interesting details on which parts are ported from the full framework and which are ground-up re-writes specifically for the Compact Framework. One of the other interesting items is the performance statistics which show the difference between the Tech Preview (doesn't that seem like a long time ago now) and "Today" (which represents when this presentation was given in 2001).  It would be very interesting to see how the release and the subsequent two service packs have made further progress on these figures.

 

#    |

The future according to Vodafone

Vodafone have a promo site indicating their vision of the future with mobile devices. While you might find the over-done flash a little irritating it does have some interesting tid-bits including an organic foldable map with location based information...

http://www.vodafone.com/flash/futures/

#    |
# Friday, December 19, 2003

Cache Bonus

On the newsgroups recently there were some enquiries about accessing the browser cache from .NETCF code. This is possible in devices running CE.NET 4.0 and above using the FindFirstUrlCacheEntry function and related functions. I put together a very sketchy demo class here:-

http://www.opennetcf.org/public/cache.zip

Its far from complete but illustrates a few techniques required. Firstly the size of buffer required is dynamic, to get around this we query the function first to retrieve the required buffer size and then allocate a byte array large enough to store the data. The data about each entry is extracted from the byte array using the BitConverter helper class and converted to .NET friendly types. I hope to complete this at some point into a complete wrapper around the WinInet Cache model and hopefully it will appear as an OpenNETCF library in 2004.

#    |
# Tuesday, December 09, 2003

Upcoming .NETCF and Smart Device Programming chat

MSDN will be hosting another MVP chat covering .NET Compact Framework and Smart Device Programming with Visual Studio .NET 2003 on Thursday - here are the full details:-

 

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

December 11, 2003
10:00 – 11:00 A.M. Pacific time
1:00 – 2:00 P.M. Eastern time
18:00 – 19:00 GMT/BST


Event Reminders


OutlookAdd to Calendar
FriendTell a Friend


 

#    |

Toggle Bluetooth state from .NETCF

For devices which use the Microsoft Bluetooth stack in Pocket PC 2003 and Smartphone 2003 (e.g. O2 XDA2 and Orange SPV E200) you can toggle the Bluetooth state from code using the BthGetMode and BthSetMode functions. This allows you to set the Bluetooth radio Off, On and Discoverable. Full source project here:-

http://www.opennetcf.org/public/OpenNETCF.Net.Bluetooth.zip

Expect this to be incorporated into a future library release from OpenNETCF. Note that this wont work on devices using the WidComm stack (iPaq models etc).

#    |
# Friday, December 05, 2003

Just finished article on using NDoc with .NETCF code

Well it has been months in the waiting but I've finally finished the article on using NDoc

http://www.opennetcf.org/Articles/ndoc.asp

Because of the differences between .NETCF  and the full .NET framework there are a lot of little quirks and workarounds. I think I've probably met all or most of them by now. I intend to add to this topic in the future to cover some advanced issue such as Html Help registration - getting your documentation to integrate with the Visual Studio help system. We are pretty close with that now in the Smart Device Framework development but there are a few outstanding issues to be tackled. Generally once registered its a very powerful feature, just typing OpenNETCF into your code brings up relevant topics in the Dynamic Help window.

#    |

Help in .NETCF Applications

I'm often asked where the best place to provide access to help files is within .NETCF applications - You cannot use the Start > Help menu so must choose an alternative, here are a few suggestions...
#    |