Tuesday, June 03, 2008

image Lou Vega, leader of the Charleston, SC .NET User's Group, asked me if he could be the VB .NET Editor for 30 Days of .NET. Again my goal is to make this as much of an open forum as possible. Since its hard to do that with one person, and Lou totally rocks, I said of course, thank you!

Basically Lou is going to take up the task of converting each of the applications to VB .NET. This is a huge boon for the community. If you are a VB .NET programmer and you want to do Windows Mobile development you will quickly discover that only something like 1 in 10 examples are done in VB .NET, if that many. And outside of Microsoft almost all content is done in C#.

I understand the decision Microsoft made. Basically most Windows Mobile developers, at least in the early days, had a background in C++ and usually Win32 programming. Microsoft wanted to cater to these developers, and win them over for the success of the platform. Also, with a new platform guidance is very important. If there was a budget for 10 tutorials that year, then if they were split between C# and VB .NET, there would only be about half as many such examples.

The choice was made to make more examples that could help beginner developers all the way to advance developers, versus having to cut out a lot of material. And trust me in the early days you needed as much help as possible because if you were doing any out of the norm it could be just a little rough. Today things are so much better, if you want to do something it is usually simple and direct.

So with that out of the way let me officially welcome Lou Vega into his new position, and offer him my sincerest thanks. Great idea Lou!


Tuesday, June 03, 2008 3:00:47 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Today, Page Brooks was telling to me about a limitation with his Windows Mobile device. His device's battery isn't powerful enough for him to be able to leave his Bluetooth radio on all day. But he really wants to be able to use his Bluetooth headset while he is driving to work in the morning, and on the way back home in the afternoon. One requirement he has is he doesn't want to have to look at the screen to accomplish this.

It would have been real easy to create a Bluetooth Toggle application that simply takes the current state of the Bluetooth radio and toggles it from on to off, and vice versa. Instead, I've decided to build a simple Bluetooth Manager application that will provide our readers with the code needed to create the Bluetooth Toggle application. My hope is that someone from the community will take this code and help Page out.

Technically I make some special "modifications" to the application that should help Page get by for the time being. When the application first starts, it toggles the Bluetooth radio mode. And I added a timer that will begin an auto shutdown after the program has been running for 1 minute. All Page needs to do is assign the application to a spare hardware key and then when he press that key it will toggle the Bluetooth radio on and off, and after 1 minute it will auto shutdown.

So according to Minutes to Midnight I have 2 hours, 21 minutes, and 6 seconds left to make today's application. So let's get on with the show.

 

image

Bluetooth Manager

This application came about due to a reader's request. So be sure to submit your ideas for applications. I strongly favor working on user submitted ideas over my own.

I always like an application to have a little eye candy, and that explains the interactive Bluetooth logo at the top of the screen. It is in color when the Bluetooth is enabled, and grayscale when Bluetooth is off. Clicking the Bluetooth logo toggles the Bluetooth radio from on to off.

I added a multiline textbox so users could see a history of Bluetooth radio state changes. There are buttons to allow users to directly turn the Bluetooth radio on and off.

One caveat is that this uses P/Invoke to access the Microsoft Bluetooth stack dlls.

Here are the calls:

   [DllImport("BthUtil.dll")]
   private static extern int BthGetMode(out RadioMode dwMode);

   [DllImport("BthUtil.dll")]
   private static extern int BthSetMode(RadioMode dwMode);

Also, we had to take advantage of State and Notification Broker API. Here's why: if the state of the Bluetooth radio were to change due to an action outside of our program we wouldn't know about it. That's where SNB API comes in. It allows us to subscribe to notifications for almost any event that we are interested in. The code is below.

   SystemState bluetoothStatePowerOn = new SystemState(SystemProperty.BluetoothStatePowerOn);
   bluetoothStatePowerOn.Changed += new ChangeEventHandler(bluetoothStatePowerOn_Changed);

   void bluetoothStatePowerOn_Changed(object sender, ChangeEventArgs args)
   {
       UpdateScreen();
   }

 

The last thing to check out is the auto shutdown code: it's simple but works great. There is a timer that waits for 1 minute to pass, and then there is a loop for the count of ten, which uses a Thread.Sleep(1000) to pause the application for 1 second each iteration of the loop. This creates a great effect that keeps the user from thinking the application has crashed.

Download executable: bluetoothManager.cab

Download Source Code: bluetoothManager.zip

[Be sure to check out the C++ Edition of 30 Days of Windows Mobile Applications]

Feedback

28 days left to go, and so far we had one idea submitted for an application. Keep them coming. So what do you guys think? Is the format working for you? Any ideas on what we can improve?

 


Tuesday, June 03, 2008 1:01:13 AM (Eastern Standard Time, UTC-05:00)  #    Comments [6]  |  Trackback
Monday, June 02, 2008

One goal I have for the "30 Days of .NET" series is that I write each application on the day I publish it. That really doesn't leave me any room to spare. I'm not sure I can do it, but that's part of the fun and challenge. I do have a life. And between family, friends, career, hobbies, and dreams, there isn't as much time in day as I would like sometimes. One thing that would be useful for me is to know how much time left I have in day to complete that day's application.

“When you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind; it may be the beginning of knowledge, but you have scarcely in your thoughts advanced to the state of science.“
- Lord Kelvin (William Thomson)

 

image

Minutes to Midnight 

Simple, simple application, but I would say it is useful. At first I just had it say 2 hours, 45 minutes, and 38 seconds remaining. But I decided that was too simple. I decided to use progress bars, because it adds a visual element that gives the application a little, let's call it, "weight".

Then I looked at the application and felt it looked a little sterile, aka dull, dull, dull. I decided the answer was to add some color. I did this by going to http://www.colourlovers.com/ and browsing their color palettes. I was even able to search color palettes by using the color of the progress bar, which I got by doing a screen capture and getting the hex color from Paint .NET.

I didn't take me long to notice I had an issue. From my point of view, it's subjective, the progress bar wasn't right. progressBarHours.Value = timeSpan.Hours; needed to be progressBarHours.Value = 24 - timeSpan.Hours;. Once I did this it was working like I wanted it to.

I wasn't thrilled with the top progress bar. It was meant to show the total remaining time left in the day, but I didn't have room for another label. But there is a saying, "The perfect is the enemy of the good." I think of this as, if you follow the road to Perfect forever, you may never get to Good. If Another reason to use the color scheme to help break the form into logical sections: yes, there is method to my madness, well, at least sometimes.

The only other thing I had to handle was total minutes left. Depending on the math, it would sometimes display "X.666666666 of 1440 total minutes left". Fortunately, there is an easy fix for this, custom numeric format strings: timeSpan.TotalMinutes.ToString("#.0").

Download Executable: minutes2Midnight.cab

Download Source Code: minuates2Midnight.zip

[Be sure to check out the C++ Edition of 30 Days of Windows Mobile Applications]

 

 

 

Feedback

Ok guys, I really need everyone's help here. I need some ideas for applications to write for the next 29 days. I have some, but I could use more. Also I'd love to hear your thoughts on how we make this series even better. I always open to ideas, and suggestions so please feel free to let me know what you think, because if I think it is a good idea I will do it.


Monday, June 02, 2008 12:48:15 AM (Eastern Standard Time, UTC-05:00)  #    Comments [3]  |  Trackback
Sunday, June 01, 2008

image Over the years, I have given many presentations on developing Windows Mobile applications. One thing that I have heard time and time again is that people have a hard time writing their first mobile application. I think sometimes people have a hard time taking those first steps. It is easy to think that it will take too much time, and that it will be too hard. But that is simply not the case.

But instead of telling people, I'm going to show them how easy it really is. The key here is simple: "Taking baby steps is better than taking no steps at all!"

I plan on writing 30 mobile applications in the next 30 days. I will publish both the executable and the source code for each application.

My goal is for each of these applications to be useful, interesting, and straight-forward. Someone considering writing their first Windows Mobile application should be able to look at these applications and "get it".

If you search, you can find tons of simple code to do specific tasks, like playing a message beep. You can even search and find code for fully developed applications, but these are too advanced for many developers, first starting out. What you'll have a harder time finding are simple applications, with source code, that can be the building blocks for new developer's understanding of mobile development. It's my hope that in the next 30 days I can do something to help with that.

Feedback

Please consider this entire series an open forum. I'd love to hear what you think, and what you want. Do you think this will help new mobile developers? Are you a new to mobile development? If so, what would most help you "get it"?


Sunday, June 01, 2008 3:00:35 AM (Eastern Standard Time, UTC-05:00)  #    Comments [7]  |  Trackback
Wednesday, May 21, 2008

image

http://www.tcspromo.com/developercontest/

You could WIN $25,000 and a Mobile Game Developer Contract.

The AT&T Developer Program, devCentral, has partnered with Windows Mobile, HTC and mobile game distributor, I-play, to bring you the AT&T Game Development Contest for Windows Mobile. Show us what you've got and have the chance to win $25,000 cash and a distribution contract. Other prizes include $5,000 cash for runners-up.

Key Dates

  • Deadline for submission: July 31st, 2008, 12 am (EST)
  • Winner announcement at CTIA in San Francisco: September 10-12, 2008

 

PRIZES:
ONE (1) GRAND PRIZE: The Grand Prize Winner will receive:
a. the opportunity for a mobile game distribution contract with I-play on I-play's standard terms (subject to the game meeting I-play's quality assurance requirements; any distribution is subject to the conclusion of a standard publishing and distribution agreement between I-play and grand prize winner);
b. the opportunity for placement (as determined by Sponsor) of game on the games portal on AT&T Media Mall, subject to Sponsor's determination of appropriateness in its discretion;
c. $25,000 (US);
d. a trip for winner and guest to the CTIA conference in San Francisco (September 10-12, 2008);
e. the announcement and recognition of Grand Prize Winner at the CTIA conference;
f. passes for winner and guest to PDC;
g. security and certification signing waivers;
h. an HTC Mobile Phone
The total approximate retail value ("ARV") of Grand Prize is $30,000, depending on location of winner's residence, departure times and any airfare fluctuations.
TWO (2) FINALIST PRIZES: The remaining two (2) finalists will each receive:
a. $5,000 (US);
b. a trip for runner-up and guest to the CTIA in San Francisco (September 10-12, 2008);
c. passes for runner-up and guest to PDC;
d. security and certification signing waivers;
e. an HTC Mobile Phone
The ARV of each Finalist Prize is $10,000, depending on location of winner's residence, departure times and any airfare fluctuations.
Trip for Grand Prize Winner and each Finalist Prize consists of: round-trip, economy-class air transportation for two (2) between the major airport with regularly scheduled flights closest to the winner's permanent residence (as determined by Sponsor in its sole discretion) and San Francisco, CA; (b) two (2) nights standard hotel accommodations (one double occupancy room and room tax only) in San Francisco area; (c) ground transportation to/from hotel and airport. Ground transportation may be provided in lieu of air travel if winner resides within 100 miles of San Francisco, CA. If winner is a resident of a jurisdiction that deems him/her to be a minor, parent/legal guardian must travel as the allotted guest. If guest is a resident of a jurisdiction that deems him/her to be a minor, he/she must be accompanied by his/her parent/legal guardian, and such person must pay his/her own expenses unless he or she is the winner. Winner and guest must travel on same itinerary on dates to be designated by Sponsor. All incidental expenses and taxes not specified herein will be the sole responsibility of the winner and his/her travel companion, including without limitation other ground transportation, food, and beverages. Winner and guest will be responsible for all applicable travel and other insurance, all applicable airport charges including without limitation, any excess baggage charges, airport taxes, and tickets are not transferable, refundable or redeemable. Sponsor will not replace any lost or stolen tickets, travel vouchers or certificates. Once booked, no change, extension, or substitution of trip dates is permitted, except by Sponsor at its sole discretion. If the CTIA conference is postponed or canceled, remainder of prize will be awarded as total prize.
Ten (10) SEMI-FINALIST PRIZES:
a. Entry into Microsoft WM Beta Developer Program;
b. WM Certification Waivers
The ARV of each Semi-Finalist Prize is $500.

Wednesday, May 21, 2008 3:00:52 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Tuesday, May 20, 2008

imageRecently the Live Search Team released a new version of Live Search for Windows Mobile.

Pros:

  • Great features: categories, maps, directions, traffic, movies, gas prices, collections, web, weather
  • GPS support
  • Search Near Here
  • Speech Recognition
  • Works for Windows Mobile, BlackBerry, and any mobile phone
  • Bluetooth headset support
  • Map a contact
  • And much more...

Cons:

  • Wish we had access to the source code, controls, etc.
  • Great opportunity for guidance, documentation, and reference as model application

Several of the MVP's and Developer Evangelists at the Charlotte Code Camp 2008 said they used and loved Live Search Mobile so that should give you a feel for just how good this product is. It is good stuff. If you haven't tried it yet, what are you waiting for?

Download Live Search for Windows Mobile 3.0


Tuesday, May 20, 2008 3:00:11 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Sunday, April 13, 2008

imageI got to check out the city some today. I heard that it was supposed to be a nice warm sunny day, but I guess the sky had other plans for today, like rain, rain, and rain. :D

Pretty cool hotel, I at the Renaissance, right down the street from the convention center. One weird thing is there is a light switch that controls the power to my desk lamp, AND the router for my Internet. There another "light" switch by that one, but I haven't figured out what it is for yet.

I've been hoping for some big things to happen in Mobility and this year seems like a good year for some of them to take place. Hopefully, there will be some non-NDA announcements that I'll be able to share with everyone. If not, then there's always the weather ;)


Sunday, April 13, 2008 6:00:46 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Friday, April 11, 2008

imageA while back Engadget announced that the iPhone was going to Exchange ActiveSync support.

It just shows you how important enterprise email is, that people will suffer through ActiveSuck, I mean ActiveSync to get it.

So what would be even more impressive than Microsoft getting ActiveSync on the iPhone? How about being able to run .NET Applications on the iPhone.

Wait for it... wait for it... there it is...

Someone has converted the Linux Mono Project for the iPhone. Wow, how cool is that? It is definitely in the early stages of life but it has some really cool possibilities for the future.

[Sources: Dev102.com and Miguel de Icaza's Blog]


Friday, April 11, 2008 3:00:37 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

[Source: Jason Langridge's WebLog]

imageGuitar Hero is now available on Windows Mobile. Yeah, I already bought it too.

My one compliant is that on the AT&T Tilt I wish I could configure the buttons for each guitar string. I have a hard time rockin' out using that rocker button.

Guitar Hero III Mobile Screenshots:

image imageimage  image

Song List

  1. Santana - Black Magic Woman
  2. Wolfmother - Woman
  3. AFI - Miss Murder
  4. Red Hot Chili Peppers - Suck My Kiss
  5. Alice Cooper - School's Out
  6. Pat Benatar - Hit Me with Your Best Shot
  7. Van Halen - You Really Got Me
  8. KISS - Strutter
  9. Smashing Pumpkins - Cherub Rock
  10. Stone Temple Pilots - Trippin on A Hole
  11. Matchbook Romance - Monsters
  12. Motley Crue - Shout at the Devil
  13. Black Sabbath - Paranoid
  14. The Allman Brothers Band - Jessica
  15. Scorpions - Rock You Like A Hurricane

 


Friday, April 11, 2008 1:53:23 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Thursday, April 10, 2008

image

Heroes Happen {Here}: Hands On Lab Manuals [Source: Paulo's Blog]
Windows Server 2008
Download All (zipped file: 7.32 MB)
Visual Studio 2008
Download All (zipped file: 13.2 MB)
SQL Server 2008
Download All (zipped file: 20.5 MB)

Hands On Lab Manuals

Windows Server 2008
Download All (zipped file: 7.32 MB)
Visual Studio 2008
Download All (zipped file: 13.2 MB)
SQL Server 2008
Download All (zipped file: 20.5 MB)
Thursday, April 10, 2008 3:00:25 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: