Friday, June 06, 2008

Today was a day I get to pick what I was going to write. One thing I've been doing a lot of lately is taking screenshot captures of either my emulator or my device. I don't know if there is a perfect solution for this, but I figured this would be a great "pain" to try to overcome.

Also, I just think this is a great utility to learn from and to use.

image

Mobile Capture

As always, let's look at how the application looks. Noticed I had more controls than I could put on one screen. Or if I could put all the controls on one screen it was going to look like a train wreck. I really try to make it so that if the user has to do something "tedious" like data entry, especially on a mobile device, that there is some sort of "cool" factor for the user to "experience".

In this case, I decided to make 3 sections to the form and have each fill the screen in response to the user clicking either the light blue "Capture", "Activation", or "Option" buttons. Notice how I disguised the buttons to look like section headers.

With a little effort each section could expand open as a visual effect, I choose to have the section just instantly pop to their minimized or maximized states. This would be a great feature enhancement for an enterprising reader to tackle. Just a matter of fine tuning it.

As far as features go, we have a lot happening there as well. Full Screen mode, Area mode, Hardware Key support, Time support, and the ability to take multiple pictures in a row.

That's a lot of application to take on in one day, and really only a couple of hours, but that's how we do it around here.

One issue I ran into was I managed to confuse myself. I though when I called Form.Hide() that is wasn't hiding the form's menu bar in time before the screenshot was taken. So I went and found the following blog article: Christian Helle's Blog: Programmatically Minimize an Application in .NET CF 2.0. Work's fine, but so does Form.Hide() just didn't figure it out for a while. Figured I'd leave imageChristian's code in for while since it is more interesting, P/Invoke and everything.

I wasn't quite sure the best way to take a screenshot anymore in .NET Compact Framework, so I looked that up to find a better way. I found this: Alex Yakhnin - Creating a screen snapshot in CF v2. And I decided it would do lovely, and it has so far. I haven't had the first problem with it.

Does anyone recognize where the feature set of this application is based on? It is a very famous Windows graphics program that was really popular a few years back now. Give it a guess.

The .NET Compact Framework HardwareButton device component made working with the device's hardware buttons a snap.

The way the application figures out what it needs to do between on the various combinations, and there are a lot of them, is pretty cool to check. Notices I didn't say clean and slick, just pretty cool. It could use some clean up.

I'm really happy with the UI; it was a simple trick to pull off the effect but I think it works great. Try it out see what you think! Alright well I think that wraps up day 05, I hope you like the

application.

 image

 

 

 

Download executable: mobileCapture.cab

Download Source Code: mobileCapture.zip

 

Feedback

I'm looking forward to seeing where we go next. I hope you are too. There hasn't been a lot of comments yet but I know word hasn't really gotten out yet either. But feel free to post your comments and ideas.


Theme design by Jelle Druyts

Pick a theme: