Tuesday, July 01, 2008

image

With most things there are two ways to learn them: the easy way, and the hard way. Visual Studio 2008 is know exception. One option, the hard way, is to spend all of your precious time learning and memorizing hundreds of Visual Studio shortcut key combinations.

Quick, what is the shortcut to perform an incremental search, or to convert selected text to lower case, or to comment a selection of code? Everyone one of these has a handy shortcut key combination. Do you know them all? If not, did you know Visual Studio has a feature you can enable so that it will show you, or maybe I should say teach you, the shortcut keys for most commonly accessed menu and toolbar items?

It is called “Show shortcut keys in Screen Tips”. You have to enable “Show Screen Tips on toolbars” for this feature to work. Both items are located on the same screen for easy access.

Here’s what you need to do:

  • In Visual Studio go to Tools, and then Customize….
  • This will open the Customize dialog where you will now need to check both the “Show shortcut keys in Screen Tips” and “Show Screen Tips on toolbars” checkboxes.

From now on when you use Visual Studio it will display shortcut key combinations on menus and toolbar tooltips whenever you use them.

If you’ll click on the included image, you will see a larger more detailed screenshot of the areas discussed.

 

Feedback:

Do you have a favorite Visual Studio 2008 tip or trick? Then tell us all about it in the comments section. I’m keeping score: Me 1 / Readers 0. Don’t let your teammates down. :D

 

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)



Tuesday, July 01, 2008 22:42:00 (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

imageI’ve committed myself to taking the knowledge I have learned, over the years, and sharing it more with others. Last month I did 30 Days of .NET Windows Mobile Applications, and this month I intend to do 31 Days of Visual Studio 2008 Tips & Tricks.

The material will come from a presentation I have given many times at different code camps and user groups. One of the goals of the series is to start a “conversation” with my readers. I want to share some of my best tips and tricks for Visual Studio, and in return I hope you’ll share some of yours with us as well.

Another goal I have is for the information to be quick and easy to “digest” and as worthwhile as possible. Give me a few minutes every day this month, and I bet I’ll make a difference in how productive you are every day.

 

Here’s the introduction from my Visual Studio 2008 Tips & Tricks presentation to set the stage:

“Visual Studio .NET is filled with hundreds of features that make our lives as developers more efficient. The number of features that Visual Studio .NET contains is immense. The Visual Studio .NET Tips and Tricks presentation is a compilation of my favorite, and most popular, tips and tricks for this great IDE. Developers who are unaware of these timesaving features miss out on opportunities to increase their programming productivity and effectiveness. This Visual Studio .NET Tips and Tricks presentation is meant to explain how to use Visual Studio .NET more effectively.”



Tuesday, July 01, 2008 22:40:00 (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Friday, June 20, 2008

After the last GPS related application, GPS Compass, I’ve been wanting to do another GPS focused application. This time I figured we’d get in the driver’s seat with our friend: SPEED.

Gentlemen, start your engines…

image

Mobile Speedometer

The application is built off of  Windows Mobile 6 SDK included a GPS Application in the samples folder, C:\Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CS\GPS.

This uses the GPS Intermediate Driver. If you are writing a location aware application for Windows Mobile this is definitely the way to go. ;)

The main UI is located at the top of the screen. We have a simple speedometer graphic in the background to add some flair to the application. On top of this we overlay the current speed based off of information returned from the GPS device. We can also use Fake GPS to simulate a GPS device.

Below this we have a readout of various GPS statistics that are updated continuously.

One thing to note is Speed may be return in knots which you will likely want to convert to either miles or kilometers.

 

 

 

 

We just need to create a method something like UpdateData below.

   1: void UpdateData(object sender, System.EventArgs args)
   2: {
   3:     if (gps.Opened)
   4:     {
   5:         if (position != null)
   6:         {
   7:             if (position.SpeedValid)
   8:             {
   9:                 labelSpeed.Text = (position.Speed/1.15077945).ToString("0.00");
  10:             }
  11:          }
  12:      }
  13: }

Possibilities:

I think a more realistic UI would be a great improvement. And the ability to switch from miles to kilometers would be good too. If the odometer would track miles traveled that would be an awesome enhancement.

Download executable: mobileSpeedometer.cab

Download Source Code: mobileSpeedometer.zip

Feedback:

Want more? What else would you like to see?



Friday, June 20, 2008 00:53:00 (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Wednesday, June 11, 2008

I mentioned to the group that I would post the Prize Picker application we wrote together on my blog as part of my 30 Days of .NET series. I think this was an awesome idea, and it looked like everyone really enjoyed themselves. Hopefully, a few of them will see this post and share their thoughts as well. It was very nice to have a hands on type presentation that everyone got to participate in together. And since only one person was “driving” we didn’t have to stop and fix a disconnected monitor. Ok, we did one time, but just one time. Open-mouthed 

Big thanks to everyone that came out and participated! Page Brooks, Donny Craft, Benton Little, , Jamey McElveen , Shawn Morris, and Thad Smith. It was a lot of fun!

 

PrizePicker

Prize Picker

There is probably someone out there who doesn’t think this is the best looking application ever. Well, you’re right! It’s not, but we didn’t really focus on that any until we had a fully functional application. At that point it was time to pick prizes for the lucky hopefuls that became winners at the event.

The only big item we didn’t implement, was an item that came up right at the end, we wanted to show the last winner in the area down at the bottom of the screen in big blog letters. And we wanted to rotate through remaining hopefuls and then finally pick a winner moving them to the winners table.

The application is a firm believer of the KISS principle. We did the entire application in about an hour and a half. And that is including some refactorings, and changes we made along the way. I’m pretty happy with the application, and will love it once we have the “Jackpot” style UI element added.

We added validation as we needed it, and decided to keep the applications logic in the UI, as hard as it was for us to do, to in this case to follow our KISS guidelines.

We have used RNGCryptoServiceProvider class already in the Pocket PasswordGen application on day six. This class makes sure that our random numbers are statistically random and not pretend watered down random.

   1: Byte[] randomBytes = new byte[4];
   2:  
   3: RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
   4: rng.GetBytes(randomBytes);
   5:  
   6: // Convert 4 bytes into a 32-bit integer value.
   7: int seed = (randomBytes[0] & 0x7f) << 24 |
   8:             randomBytes[1] << 16 |
   9:             randomBytes[2] << 8 |
  10:             randomBytes[3];
  11:  
  12: int pick = seed % listViewHopefuls.Items.Count;

 

Download executable: prizePicker.cab

Download Source Code: prizePicker.zip

Feedback

The cool thing is we used this application to actually pick the winners for the prizes, and everything went great. So our intention is to keep using it from now. We are also going to post it on CodePlex soon and allow others to work on it as well.



Wednesday, June 11, 2008 02:55:00 (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Wow, today was a busy day. I gave a Windows Mobile Programming presentation today at a .NET user group I help run, PDANUG. I changed it up at the very last minute, and instead of doing the presentation I was planing on doing we wrote a Windows Mobile application together. It was great. I think everyone contributed, and got something out of it. In the end we had a very nice Prize Picker application that we will be able to use again and again in the future. And I have a new talk that I can present. Any takers?

 

image

What is My IP?

You may have seen sites like WhatIsMyIP.com, IPChicken.com, and my favorite IPCow.com. Most people prefer command prompt and good ole IPConfig. But sometimes when you are troubleshooting an issue with a friend of family member over the phone that’s not always the best idea. Usually in those kind of situations it is easier to send someone to a Web site and just have them read the value to you. I think some of the sites above will render appropriately on a mobile device, pretty sure IPCow.com does.

But what if you can’t connect to the Internet, and you need to see your Intranet IP address. In this case, and many others, one wants something a little more direct, and clear.

For this reason, “What is My IP?” exists. It couldn’t be simpler. Run the program, then see your IP address, or IP addresses in case you have multiple connections open. Which is very possible with today’s devices, with everything from Bluetooth, cellular connections, wireless connections, and more.

This application only does one thing, so it needs to do it very well. And it needs to be appealing in how it looks and how it does it.

Since the application has minimal features, it has a minimalist style to it. There is only one focus point of attention and that is the large network icon in the center of the screen. Everything else is clean and simple.

There’s only one method of note in this application: RefreshData()

   1: private void RefreshData()
   2: {
   3:     string deviceName = System.Net.Dns.GetHostName();
   4:  
   5:     textBoxDeviceName.Text = deviceName;
   6:  
   7:     IPAddress[] addresses = Dns.GetHostEntry(deviceName).AddressList;
   8:  
   9:     comboBoxDeviceIP.Items.Clear();
  10:     for (int i = 0; i < addresses.Length; i++)
  11:         comboBoxDeviceIP.Items.Add(addresses[i].ToString());
  12:  
  13:     if (comboBoxDeviceIP.Items.Count > 0)
  14:         comboBoxDeviceIP.SelectedIndex = 0;
  15: }

Download executable: whatIsMyIP.cab

Download Source Code: whatIsMyIP.zip

Feedback

Not bad 10 applications in 10 days. Won’t be long before we’re at 20 applications in 20 days, and then 30 applications in 30 days. Keep the feedback coming.



Wednesday, June 11, 2008 02:14:00 (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback
Tuesday, June 10, 2008

Tuesday, June 10th, 2008image
Chris Craft

Topic: Windows Mobile Programming

Tuesday, June 10th, 2008, is the next meeting of the Pee Dee Area .NET User Group.

Chris Craft will be presenting at Microsoft Mobility Roadshow alongside Brian Hitney, Glen Gordon, and Lou Vega in Charlotte - June 18, 2008 and Atlanta (Alpharetta) - June 24, 2008. These are full day Windows Mobile device application development events.  PDANUG will be hosting our own special "Welcome to the World of Windows Mobile" event to keep in theme these two MSDN events.
Focus will be Windows Mobile 6.x and using Visual Studio 2008 to developer mobile applications.
Topics to be covered:

  •       Intro to Windows Mobile
  •       Data Guidance (some discussion of line of business applications)
  •       Whole New Level
Speaker Bio
Chris Craft
Pee Dee Area .NET User Group
Florence, SC      
•    Microsoft Windows Mobile Device Application Development MVP
•    Cofounder and regular speaker of Pee Dee Area .NET User Group.
•    Frequent CodeProject.com article author.
•    Expert's Exchange Windows Mobile Programming Master.
Email: ccraft@pdanug.net
Web: http://pdanug.net/
Blog: http://cjcraft.com/blog/


Here is the tentative schedule:
6:00 PM - 6:20 PM Socializing / Free Dinner
6:20 PM - 6:30 PM Introduction, Sponsor Time, and News.
6:30 PM - 8:00 PM Presentations



Tuesday, June 10, 2008 11:52:00 (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Wednesday, June 04, 2008

image Just caught sight of a really good post by Robert McLaws: Windows Vista Edition : Windows SideShow for Windows Mobile Beta – FINALLY!

Awesome. This is really good news.

What is Windows SideShow?

Windows SideShow is a new technology in Windows Vista. With Windows SideShow, developers can write gadgets to send data from a computer to devices connected to that computer.

The beta requires you to have a device with either Windows Mobile 5.0 or  Windows Mobile 6  Professional or Standard Edition. You will also need a Bluetooth-enabled Vista PC.

Even though Robert warns that the Beta is "version 0.01", I didn't have the first problem. It just worked. :D

 

The ScreenShot Tour

 

NoGadgetsAvailable NoGadgetsAreTurnedOn Options

No gadgets available

No gadgets are turned on

Options

 

Things are pretty dull when you first set up Windows SideShow for Windows Mobile.

 

VistaSideShow

Let's enable some gadgets for our Device. The HTC-8900 you see above is my AT&T Tilt phone. "Inbox - Windows Mail", and "Windows Media Player" gadgets are installed by default in Vista. And I think the "Office Outlook 2007 Calendar" find its way into your machine if you have Office 2007. I download the "Countdown" gadget, and the "Office PowerPoint Remote" from the SideShow Gadget Gallery.

 

WindowsMediaPlayerStopped2 Albums BrowseMediaLibrary Genres

[ Stopped ]

Albums

Browse Media Library

Genres

PlayNow WindowsMediaPlayerPlaying NowPlaying WindowsMediaPlayerStopped3

Play now

[ Playing ]

Let's Get It Started

[ Stopped ]

 

Great background. It's just eye-candy, but it really adds a lot of polish and class to the application. Nice feature set for this Windows Media Player gadget. And since it is so simple, it is fast. You can get to Albums, Artists, Playlists, and Genres very easily and get to your media quickly. You can see album art for the currently playing song, but it is very small. I think this should be updated. Notice, I added a second gadget, "Office Outlook 2007 Calendar, between the first screenshot and the last one.

 

WindowsMediaPlayerPlaying2 OfficeOutlook2007Calendar InboxWindowsMail

[ Playing ]

No information available

Inbox - Windows Mail

 

You can see the SideShow gadget from the desktop which is a really good idea. And I've included a couple of screen shots of the calendar and mail gadgets. Not a lot to see here but it is mostly because I don't have good data to see it shine on this machine.

 

PowerPointSideShow

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hmm, I couldn't resist I had to try the Microsoft Office PowerPoint Remote for Windows SideShow.

 

NoPresentationsOpen Session5MobileData CurrentSlideMobilityMetro OfficePowerPointRemote

Office PowerPoint Remote

Session 5 Mobile Data.pptx

Next Slide

Presenting: Session 5

 

Wow, this gadget is just awesome. People pay really good money for PowerPoint remote and how many can show the PowerPoint deck on the screen. It even works from the Today screen, and you can just use the hardware buttons to control the presentation. This is going to be really popular.

Feedback Wanted:

If you decide to give Windows SideShow for Windows Mobile a try, please consider posting what you think, or maybe even do a Screenshot Tour of your favorite SideShow gadget.



Wednesday, June 04, 2008 04:20:53 (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  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 03:00:25 (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Monday, April 07, 2008

Due to the scheduling conflict with the Heroes Happen Here Event in Charlotte, the April PDANUG Event has been moved to April 29th, 2008.  More details to follow.  See you all in Charlotte tomorrow!


imageTuesday, April 29th, 2008
Chris Reeder, Chris Craft, and Page Brooks

Topic:
SQL Server 2008, Windows Server 2008, and Visual Studio 2008 (Respectively)

Tuesday, April 29th, 2008, is the next meeting of the Pee Dee Area .NET User Group.

Chris Reeder, Chris Craft, and Page Brooks will be presenting on the latest exciting new products from Microsoft.  First, Chris Reeder will give us a run down on a few cool features in SQL Server 2008.  Next, Chris Craft will take us on a tour of some excellent new features in Internet Information Services 7 (IIS7).  Page Brooks will finish off the presentation with a few cool tips and tricks in Visual Studio 2008.

Please click the link below to register.  We use this information to determine how much food to buy!

Here is the tentative schedule:
6:00 PM - 6:20 PM Socializing / Free Dinner
6:20 PM - 6:30 PM Introduction, Sponsor Time, and News.
6:30 PM - 8:00 PM Presentations



Monday, April 07, 2008 03:00:08 (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback