Posts
133
Comments
328
Trackbacks
0
November 2011 Entries
1360x768x32 Resolution in Windows 8 in VirtualBox

 

My Lenovo ThinkPad's built-in screen maxes at 1366x768x32. I wanted to use that same resolution with Windows 8 Developer Preview inside of VirtualBox. So, what did I do?

  • Downloaded the latest build of VirtualBox v4.1.6 (because it supports Windows 8 x64)
  • Installed Windows 8 Developer Preview in VirtualBox as I did earlier this year.
  • Installed Guest Additions.
  • Ran the CustomVideoMode described in this blog post.

…and quickly found out that I didn’t have the option to use 1366x768x32 inside of VirtualBox despite using the following command:

VBoxManage.exe setextradata  "[Virtual Machine Name]" CustomVideoMode1 1920x1080x32

 

So how do you fix it?

If you do a little research on this resolution, then you will find it is a non-standard resolution. Even if you run the command:

VBoxManage.exe setextradata "[Virtual Machine Name]" CustomVideoMode1 1366x768x32

It will still not show that resolution inside of VirtualBox. You can fix this easily by using the following command as shown below:

VBoxManage.exe setextradata "[Virtual Machine Name]" CustomVideoMode1 1360x768x32

SNAGHTMLaa756ce

I hope that you noticed the command used the resolution of 1360 instead of 1366. Now if you go to your display option for Windows 8 inside of Virtualbox then you can select that resolution.

image

Anyways, I hope this helps someone with a similar problem. I created this blog partially for myself but it is always nice to help my fellow developer. 

Thanks for reading.

alt Subscribe to my feed

Posted On Friday, November 25, 2011 12:33 PM | Feedback (0)
Fixing a broken toolbox (In Visual Studio 2010 SP1)

 

image

I was recently running into a situation where every time I opened Visual Studio 2010 SP1, the following message would appear for about 60 seconds or so:

"Loading toolbox content from package Microsoft.VisualStudio.IDE.Toolbox.ControlInstaller.ToolboxInstallerPackage
'{2C98B35-07DA-45F1-96A3-BE55D91C8D7A}'"

After finally get fed up with the issue, I started researching it and decided that I’d share the steps that I took to resolve it below:

  • I first made a complete backup of my registry.
  • I then removed the following key:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{2c298b35-07da-45f1-96a3-be55d91c8d7a}]
  • I went to the following directory: C:\Users\Your Name Here\AppData\Local\Microsoft\VisualStudio\10.0\ and created a folder called bk and moved the .tbd files to that folder (they are hidden so you will have to show all files). I then removed the .tbd files in the root directory.

SNAGHTMLcaac6ca

  • I then launched Visual Studio 2010 SP1 again and it recreated those files and the problem was gone.

Anyways, I hope this helps someone with a similar problem. I created this blog partially for myself but it is always nice to help my fellow developer. 

Thanks for reading.

alt Subscribe to my feed

Posted On Friday, November 18, 2011 7:49 PM | Feedback (6)
Kinect Presentation at Chippewa Valley Code Camp

 

On November 12th 2011, I gave a presentation at Chippewa Valley Code Camp titled, “Kinecting the Dots with the Kinect SDK”. As promised, here is the Slides / Code / Resources to my talk.

image
(click image to download slides)

The Kinect for Windows SDK beta is a starter kit for applications developers that includes APIs, sample code, and drivers. This SDK enables the academic research and enthusiast communities to create rich experiences by using Microsoft Xbox 360 Kinect sensor technology on computers running Windows 7.

Resources :

Download Kinect for Windows SDK beta 2 – You can either download a 32 or 64 bit SDK depending on your OS.

FAQ for Kinect for Windows SDK Beta 2

Kinect for Windows SDK Quickstarts for Windows SDK Beta 2

Information on upgrading Kinect Applications to MS SDK Beta 2. – Brand new post by me on how to upgrade Kinect applications to Beta 2.

Getting the Most out of the Kinect SDK by me for the Microsoft MVP Award Program Blog.

My “Busy Developers Guide to the Kinect SDK” (still references Beta 1 – but most information is still valid)

Helpful toolkits / templates mentioned in the talk.

Coding4Fun Kinect Toolkit – Lots of extension methods and controls for WPF and WinForms.

KinectContrib – Visual Studio 2010 Templates (not updated for Beta 2 as of 11/14/2011).

Fun Projects for learning purposes (all updated to Beta 2):

Kinect Mouse Cursor – Use your hands to control things like a mouse created by Brian Peek.

Kinect Paint – Basically MS Paint but use your hands!

Kinecting the Dots: Adding Buttons to your Kinect Application (not on Beta 2 – but check out the guide by me on how to do this)

Thanks for attending!

I had a really great time at the event and would like to personally thank everyone for coming out to support the local community. 

Thanks for reading.

alt Subscribe to my feed

Posted On Monday, November 14, 2011 4:36 PM | Feedback (0)
Information on upgrading Kinect Applications to MS SDK Beta 2.

 

 

Introduction

Microsoft recently released the Kinect for Windows SDK Beta 2. It contains many enhancements and fixes that can be found here. The only problem with it is that a lot of current demo applications no longer function properly. Today, I’m going to walk you through a typical scenario of upgrading a Kinect application built with Beta 1 to Beta 2.

Note: This tutorial covers WPF, but you can use the same techniques for WinForms.

1) Fix the references

Let’s start with a fairly popular Kinect demo called Kinect User Interface Demo.

SNAGHTML99e3ca4

This project uses the beta 1 version of Microsoft.Research.Kinect.dll and version 1.0.0.0 of Coding4Fun’s Kinect library.

After you download the source code and extract the zip you will see the following references in Visual Studio 2010:

Pay attention to the following references as these are the .dlls that you will have to update:

  • Coding4Fun.Kinect.Wpf
  • Microsoft.Research.Kinect

image

If you click on Coding4Fun.Kinect.Wpf file you will see the following version information (v1.0.0.0):

image

This needs to be upgraded to the Coding4Fun Kinect library built against Beta 2. So head over to http://c4fkinect.codeplex.com/ and hit download and you will have the following files.

image

Go ahead and hit the delete key on your keyboard to remove the Coding4Fun.Kinect.Wpf.dll file from your project. Select “Add Reference” and navigate out to the folder where you extracted the files and select Coding4Fun.Kinect.Wpf.dll.

SNAGHTML4e9332a

If you click on the Coding4Fun.Kinect.Wpf.dll file and check properties it should be listed at 1.1.0.0:

image

Fix Microsoft.Research.Kinect.dll

The official SDK Beta 2 released a new .dll that you will need to reference in your application. Go ahead and select Microsoft.Research.Kinect.dll in your application and hit the Delete key on your keyboard. Go ahead and select Add Reference again and select Microsoft.Research.Kinect.dll from the .NET tab. Double check and make sure the version number is 1.0.0.45 as shown below.

4

References fixed – Runtime needs to be updated.

So we have fixed the references in a typical Kinect application that uses Microsoft’s SDK and C4F Kinect libraries. Now, we will need to update the runtime. All Beta 1 Kinect applications will instantiate the Runtime with the following code:

image

Can you see that it is now marked with [Depreciated]? That means we need to update it before Microsoft decides to remove it from future versions of the SDK.

We can fix this very easily by replacing this code:

readonly Runtime _runtime = new Runtime();

with

Microsoft.Research.Kinect.Nui.Runtime _nui;

and adding similar code to our Loaded event as shown below

public MainWindow()
{
    InitializeComponent();
    Loaded += new RoutedEventHandler(MainWindow_Loaded);
}

void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
    if (Runtime.Kinects.Count == 0)
    {
        txtInfo.Text = "Missing Kinect";
    }
    else
    {
        _nui = Runtime.Kinects[0];
        _nui.Initialize(RuntimeOptions.UseColor);

        // Video Frame Ready Event can happen now!!! 
        //_nui.VideoFrameReady += new EventHandler<ImageFrameReadyEventArgs>(_nui_VideoFrameReady);
        _nui.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);

    }
}

In this sample, I am testing to see if a Kinect is detected and if it is then I initialize the runtime with my first Kinect by using the Runtime.Kinects[0]. You can also specify other Kinect devices here. The rest of the code is standard code that you simply modify however you wish (ie Skeletal, Depth, etc) depending on what type of video feed you want.

Conclusion

As you can see it really wasn’t that painful to upgrade your project to Beta 2. I would recommend that you go ahead and upgrade to Beta 2 as future versions of the SDK will use these methods. 

Thanks for reading.

alt Subscribe to my feed

Posted On Monday, November 14, 2011 7:33 AM | Feedback (1)
Tag Cloud