Blog

  • 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

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

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

  • 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

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

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

  • 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

  • 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 filesNDoc 1.3binnet1.1NdocGui.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).

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

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