Wednesday, December 20, 2006

Alpha Blending on SmartPhone

I created a quick test app to experiment with the performance of the P/Invoke AlphaBlend calls as discussed in this blog post by Chris Lorton. The AlphaBlend native call does not support per-pixel alpha blending so the alpha value is specified for the entire image. The "incr" label in these two videos is the step value for the alpha channel used in the animation. The frame rates were better than expected, right around 17-20fps.

The tool I am using to record the video is called CoolCapture (I'm using the trial version here). It's very cool. It's essentially a fully featured screen capture tool for Windows Mobile 5 devices. You can generate both videos or pictures. I was fairly impressed with the performance as well; capturing these two videos below only resulted in about a ~6 fps reduction in my animation (thus the blending doesn't look as smooth as it actually is). The trial version limits the recording interval to ~10 seconds (though the webpage says 5 seconds).

Note that the capture resolution was 240x320 (the device resolution); however, this was automatically changed to 640x480 when I uploaded the video to YouTube. This is why the videos have that stretched out look.

Wednesday, December 13, 2006

2125 ActiveSync Internet Pass Through

I was trying to use ActiveSync as a pass through to my laptop's internet connection so that I could debug a HttpWebRequest problem while tethered to VS2005. However, I couldn't even get PIE (Pocket IE) to use the ActiveSync connection much less my app--well, now I'm at least half way there. I can browse the web using PocketIE and ActiveSync as my internet connection.

1) Open ActiveSync on your computer, select File->Connection Settings. In the ComboBox below "This computer is connected to:" make sure "The Internet" is selected.

2) In PIE, select Tools->Options->Connections. Then, select "The Internet" as your network.

Now, I'm going to see if my own app can do this.

Tuesday, December 12, 2006

Link to Files in VS2005

David Kline posted about sharing code between multiple projects (where a common assembly is not appropriate):

I would prefer to not create a duplicate of this file as maintaining changes between the two copies can be time consuming and error prone. Fortunately, Visual Studio 2005 has a great feature to allow for file sharing between projects -- you can add an existing file as a link. Here's how:

1. In the project where you wish to add the file, right click the project name in the Solution Explorer
2. Select Add and then Existing Item...
3. In the Add Existing Item dialog, navigate to the desired file
4. Click the downward pointing arrow next to the Add button and select Add As Link.
Once added to a project, linked files are easy to identify by the small arrow in the lower-left corner of the file icon in the Solution Explorer.