Bing Maps with JavaScript and Windows 8

I was having some trouble finding any good information on how to implement the final build of Bing Maps (v1.1.20120927.0) into a WinJS Windows Store application. ┬áIt’s actually pretty simple.

Start by downloading and installing the Bing Maps SDK from:
http://visualstudiogallery.msdn.microsoft.com/bb764f67-6b2c-4e14-b2d3-17477ae1eaca

In Solution Explorer, right click on References and add a reference to “Bing Maps for JavaScript”

Add the following script tag to the top of your HTML file:

And add a DIV tag to the HTML which will contain the map:

Now add the following JavaScript code to your JavaScript file:

Add this JavaScript to your onactivated or ready events in the JavaScript file:

 

Determining if a .NET CF ComboBox is dropped down

The following snippet of code can be used to determine whether a Windows Mobile ComboBox (in .NET Compact Framework) is currently dropped down or not:

 

 

Get a list of active local users with .NET

The code below will return all users on the machine that are not marked as disabled. Be sure to add a reference to System.DirectoryServices.