Silverlight, 44 examples to do pretty much everything
05 August 08 03:43 PM | Coding4Fun | 0 Comments   

e4952ae7-3399-43df-9816-df16b7e6d4fa[1] Mike Taulty did a spectacular collection of Silverlight 2.0 screencasts.  They range from the standard Hello World to data binding to file IO to threading.

Channel 9 has a complete list of all 44.

Filed under:
AddOn Studio for World of Warcraft v2 beta
31 July 08 03:29 PM | Coding4Fun | 3 Comments   

For those lovers of World of Warcraft, The AddOn studio for Visual Studio v2 beta is now available on CodePlexChannel 9 even did an interview with some of the developers.


Gabor Ratky and Attila Kisko: AddOn Studio for World of Warcraft
Filed under:
Silverlight controlling your workout
28 July 08 01:01 PM | Coding4Fun | 1 Comments   

Page Brooks created a neat Silverlight application that controls his treadmill.  Page openly admits it is a proof of concept and really lacks a real purpose, but from using some tools, he was able to create a very usable UI with minimal effort.

Treadmill Controller

Here is a video of it in action.

 

Update:  I put down the wrong person, Page Brooks created this.  Sorry!

Update 2: Page has a 2nd part of this 3 part series on their blog.

Filed under:
We want you to brag to us!
22 July 08 11:59 AM | Coding4Fun | 0 Comments   

Heroes Popfly WhiteHeroes Express White 

Remember when your parents told you not to brag?  Don’t listen to them. 

The Coding4Fun team wants you to tell us your story so we can feature you on our site!  PopFly or Visual Studio Express, both work!

If you’re interested, send us your story to expop@microsoft.com

Filed under:
GeoTag, You’re it!
21 July 08 01:21 PM | Coding4Fun | 0 Comments   

Roiy Zysman has an interesting article on GeoTagging images.  With a few quick .Net image functions, Roiy was able to embed the GeoTag properties in.

geotag

Now if you really want to do GeoTagging and your camera doesn’t support it, I suggest syncing your GPS and camera together then merging the data from the GPS to the time stamps on your photos!

Filed under:
A terrarium in my computer? I’m more of a city person …
16 July 08 11:30 AM | Coding4Fun | 1 Comments   

whidbey_image001_3[1] Scott Parker alerted me that the Windows SDK team released TerrariumTerrarium’s source code can be found over on CodePlex too!

So what is Terrarium?  Way back in .Net 1.x land, someone game up with the idea to create a game to get people interested and building cool stuff.  In Terrarium, you can create herbivores, carnivores, or plants and then introduce them into a peer-to-peer, networked ecosystem where they complete for survival. Terrarium demonstrates some of the features of the .NET Framework, including Windows Forms integration with DirectX®; XML Web services; support for peer-to-peer networking; support for multiple programming languages; the capability to update smart client, or Windows-based, applications via a remote Web server; and the evidence-based and code access security infrastructure.

Here are a few of their hit list items to get fixed:

  • 3.5 framework/Visual Studio 2008 upgrade
  • Leverage 2.0 language features. Much of the code was 1.1 so generics and other goodness wasn’t there. The current codebase is compiled and built on Visual Studio 2005/2.0 Framework but not really making use of the features (yet). For example, all WinForms are 1.1 style (i.e. no partial classes). Same with the 3.5 upgrade where more cool stuff could be done all over the codebase.
  • Extend the current system by adding new features. Not sure off the top of my head what those features would be but there’s plenty of room for improvement.
  • ClickOnce install of the Terrarium Client from a Terrarium Server. This would be a nice-to-have since ClickOnce is a breeze to keep clients updated. However it would require some reshuffling of the current client as it requires additional files and ClickOnce has limitations on what it can put on a users machine.
  • XNA upgrade/port. This is pretty major as DirectX isn’t really all that abstracted away in the current system but the hope would be to bring Terrarium to the Xbox 360 (complete with networking support). This is probably a 4.0 release that could be a year or so away (but would kick the llamas’ butt)
  • The server project website is a bit of a mess (read:disaster). It was built in the 1.1 days and never updated. It contains a mixture of code behind files, raw class files, and aspx pages with embedded code. In short, it needs to be rewritten. The web services are okay, although with moving to 3.5 we should probably look at using WCF instead.

They would love to have community members to help out too.

Update:  Scott Hanselman has an article about Terrarium too.

Filed under:
Radiohead armed with lasers
14 July 08 01:41 PM | Coding4Fun | 2 Comments   

cliffs Radiohead did something pretty interesting.  They released their new music video, which was done all in LIDAR.  Their video is, for all intents and purposes, is just pure data!

They have all the data for you to play with over at http://code.google.com/creative/radiohead/

If you want to get it running on your PC, use need to grab a copy of Processing over at http://www.processing.org/download

Filed under:
2-3-2 combo
11 July 08 05:08 PM | Coding4Fun | 0 Comments   

image I love Minesweeper.  CouchPotato99 does too, so much so they created a Zune Minesweeper game!  Currently on version 2.1, Potato gives out full source code over at CodePlex.

And if you’re really hardcore about minesweeper, why not view the in-process memory and cheat?

Filed under:
Fact 2053: Control click will highlight an entire word in VS
10 July 08 02:16 PM | Coding4Fun | 2 Comments   

519S2R9QQ0L._SS500_[1] Sara Ford over at blogs.msdn.com has an amazing stream of tips and tricks with Visual Studio.  She currently is on 256!  A bunch of these tid bits about VS I had no clue were even in it!

One of my favorite tricks that most I’ve talked to aren’t aware of is using the Immediate window as a debugger.  You can do this during design or runtime.

Filed under:
DeepZooming different layouts
08 July 08 11:32 AM | Coding4Fun | 0 Comments   
image

Wilfred Pinto has a great demo of how to do Deep Zoom with 2 different render layouts.  Wilfred’s demo shows how to do a multi-row then a single row layout based on the images height.

Wilfred even highlights what code is required to do the tasks at hand!

Filed under:
Dundies for everyone!
02 July 08 08:54 PM | Coding4Fun | 2 Comments   

216051_f260[1] One of Coding4Fun’s favorite contributor, Arian Kulp, was awarded the Microsoft MVP award for Visual C#.  Last year another one of our contributors, Brian Peek, won the award.  And Brian was awarded again this year!

Awesome work guys.

And as always, if you are interested in becoming a contributor like Arian and Brian, contact Code4Fun@microsoft.com.  We’d love to have you.

Filed under:
On the 14th day of Windows Mobile, What did someone develop for me?
30 June 08 12:08 PM | Coding4Fun | 1 Comments   

image Chris Craft decided to do 30 days of Windows Mobile development.  Seeing some of the applications Chris created, I must say, I was a tad jealous.  Getting past my bruised ego, I started checking out the applications he wrote and saw some really neat stuff.

He has multiple applications that use GPS, a SMS logger, a drawing application, a trip planner, Bluetooth manager, …

Chris even has a recap of week 1, week 2 and week 3!

Filed under:
Dream-Build-Play, v2
27 June 08 03:05 PM | Coding4Fun | 0 Comments   

image

This year the XNA team have up’ed the ante with their Dream-Build-Play challenge.  You can have a team between 1 to 7 people and have to create a game for the Xbox 360.  There are $75,000 in prizes along with a chance to receive an Xbox LIVE publishing contract!

Key facts to pay attention to:

  • The game must be playable on the Xbox 360.
  • Entries are due between 9/1/2008 - 9/23/2008
  • Max size is 200mb
  • Winners announced on October

For additional information, head over to http://dreambuildplay.com.

BlueBoss - Bluetooth Proximity Detection
26 June 08 03:09 PM | Coding4Fun | 0 Comments   

Summary:

Bluetooth is now found in a variety of devices and enable the user to use wireless accessories.  The Bluetooth protocol allows a user to “discover” any device that is in proximity to your Bluetooth radio.  Why not see who is in proximity to you?  Why not have the presence of a device execute programs or alert you?

Andy Konkol – http://copyandwaste.com

 

Hardware:

  • Bluetooth radio (USB dongle)

  • SMA Female Jack

  • SMA male to N-male pigtail

  • 2.4 GHz antenna (with N-female connector)

Software:

Download:

Bluetooth and Hardware:


Bluetooth was designed for devices to communicate wirelessly over short distances.  However, with a very simple hardware modification you can extend the range of your Bluetooth radio with standard 2.4ghz antennas used in wireless networking (802.11 a/b/g).

Modifying Bluetooth dongles to accept external antennas is documented all over the Internet.  In principle it is very easy: find the antenna lead and solder on a connector/antenna.  I purchased a very cheap Bluetooth USB dongle on eBay and opened the casing.  After finding the antenna trace on the circuit board I soldered on a SMA Female connector to it.  After soldering the antenna jack in place I slipped a 3 inch chunk of heatshrink and heated it to cover the exposed circuit board.  Now I had a Bluetooth radio that accepts external antennas. Adding an antenna simply increases the range of your radio, allowing you to “see” devices from a farther distance.

To connect an external antenna to the dongle I needed to use a connector converter called a pigtail.  I used a SMA male to N-male pigtail.  I connected one end of the pigtail to my dongle and the other to an omni-directional 9dbi panel antenna that had an N-female connector.

IMG_2070[1] IMG_2071[1]

Software:


To take advantage of my newly modified hardware I needed to download the Coding4Fun Toolkit.  Included in the toolkit is an API for Bluetooth devices.  This API allows you to do a wide variety of things with your Bluetooth radio but I focused on two methods from the ServiceAndDeviceDiscovery library: DiscoverAllDevices and DiscoverDeviceByName.

DiscoverAllDevices allows you to “scan” the airwaves on the 2.4 GHz band and report back what devices your radio sees.

DiscoverDeviceByName allows you to scan for a particular device with a specified name and report back if it is present or not.

private bool DevicePresent()
{
    BluetoothDeviceServicesManager workerBTMgr = new BluetoothDeviceServicesManager();
    Device workerDevice = workerBTMgr.DiscoverDeviceByName(_watchItem.DeviceName);

    return (workerDevice != null);
}

public void Run(String Operation)
{
    switch (Operation)
    {
        case "SingleDevice":
            if (DevicePresent())
            {
                _parentForm.Invoke(_parentForm.AddToDeviceSeenList, new object[] { _watchItem });
            }
            else
            {
                _parentForm.Invoke(_parentForm.RemoveFromDeviceSeenList, new object[] { _watchItem });
            }
            break;
        case "AllDevices":
            BluetoothDeviceServicesManager workerBTMgr = new BluetoothDeviceServicesManager();
            List<Device> Devices = workerBTMgr.DiscoverAllDevices();
            _parentForm.Invoke(_parentForm.ThreadUpdateDiscoverBox, new object[] { Devices });
            break;
    }
}

Both of these methods require that the device you are scanning for is in discoverable mode (which most manufacturers enable by default).  Using the two methods described above I was able to tell if a device is in proximity. And ultimately enabling me create alerts and execute programs based on what device is present.

To perform device discovery and not have my UI lag I had to create two worker threads.  One worker thread to discover all devices and display it under my devices listbox, and another to discover devices by name specified in the “watchlist.”  I am not an expert at multi-threaded programs but I managed to implement them without any major headaches.

User Interface:

Since the “Add to watchlist” and “Edit” buttons essentially do the same thing, I decided to overload a windows form.  I also wanted to keep track of the parent form and disable it when the WatchItemForm was shown.

The second overload allows me to fill in the form control's text based on the data that is already set for the WatchItem that has been selected (the Edit button). 

public WatchItemForm(Form1 f, String DeviceName)
{
    InitializeComponent();
    this._parentForm = f;
    lblDeviceName.Text = DeviceName;
}

public WatchItemForm(Form1 f, WatchItem item)
{
    InitializeComponent();
    this._parentForm = f;

    lblDeviceName.Text = item.DeviceName;
    tbxPicturePath.Text = item.ImagePath;
    tbxProgramPath.Text = item.ProgramPath;
    this._parentForm.Enabled = true;
}

I wanted to have a pop up notify window similar to outlook and was able to find Robert Misiak's NotifyWindow. This is a very simple library which allows you to create pop up notify windows very easily. I edited NotifyWindow to include a “picturepath” variable as well as picturebox on the form. As you can see creating a NotifyWindow is quite easy:

public void NotifyDeviceWindow(WatchItem x)
{
    NotifyWindow nw;
    nw = new NotifyWindow();
    //validate Alert Message
    if (x.AlertMessage == null)
    {
        nw.Text = x.DeviceName;
    }
    else
    {
        nw.Text = x.AlertMessage;
    }
    //validate picture
    if (x.ImagePath != null)
    {
        FileInfo imgfile = new FileInfo(x.ImagePath);
        if (imgfile.Exists)
        {
            nw.PicturePath = x.ImagePath;
        }
        else
        {
            MessageBox.Show("Image does not exist");
        }
    }
    nw.Notify();

    if (x.ProgramPath != null)
    {
        RunProcess(x.ProgramPath);
    }
}

Process Flow/Software Operation:

  1. User clicks the “Discover” button, a thread is spawned which enumerates all Bluetooth devices in proximity
  2. Thread finishes and updates the Devices listbox
  3. User selects a discovered device and clicks “Add to watchlist” A watch item form is spawned and asks you for an alert message, a picture path, and an executable path
  4. User clicks save , a WatchItem object is created and added to the watchList object
  5. A timer starts and every 10 seconds a thread is spawned to discover that device by name
  6. If the device is discovered, it is added to the “deviceSeenList” and a notify alert is sent and the executable is executed.
  7. If that device is still present after the next timer click, no notification is sent, If that device is not present it is removed from the “deviceSeenList”

Screenshots:

bb-main[1]  
 bb-watchitem[1] bb-notify_1[1]

    iTunes, YouTube, WoW oh my
    23 June 08 04:58 PM | Coding4Fun | 0 Comments   

    Slide17[1] Dan Fernandez had been keeping busy and recently did a talk over at TechEd for Coding4Fun.  He did a talk on programming using the iTunes, YouTube, Zune, Vista Peer-to-Peer, and World of Warcraft API sets.  Here are some direct source links.

    Dan even released is PPT deck.

    Filed under:
    More Posts Next page »
    Page view tracker