Wednesday, May 18, 2005

More Windows Goodies

I have tried out a few new cool Windows features.

You can now make your status bar entry for your program flash using the Flash method.
In VB code Me.Flash(). One place this could come in handy is to notify a user when an asynchronous operation has completed, perhaps a Web service call or using one of the new asynchronous data retrieval techniques in ADO.NET 2.0.

Another cool feature is the new resource editor and the accessing of resources. Visual Studio 2005 really makes it easy to place strings, icons, images etc into a resource file as the resource editor has been vastly improved. Simply open project properties and select the Resource tab. The resource editor will appear. Icons and Images are now easily added as resource entries. For example, just select images from the Categories dropdown at the top of the resource editor. Then, drag an image (i.e. a BMP file) from the file explorer into the resource editor. Give it a name (i.e. pic1)

Also add a string entry; select String from the Categories dropdown and add an entry giving the string a name and value. Now the cool part, you only need one line of code to access the value or the image from the resource file. Suppose you added a resource string named test. In a code window, type something like:

Dim s as string = My.Resources.test ‘Access the string
Picturebox1.image = My.Resources.pic1 ‘Access the image

Resources are now available from My.Resources. This is also true for images, icons etc. This makes resource values even easier to use!!

Tuesday, May 03, 2005

Click Once Technology - Visual Studio 2005

I attended a day of .NET on Saturday 4/30 (Kudos to CNUG for sponsoring this great event). All talks that I attended were very helpful.

There was a talk given by Chris Mayo, a Microsoft Evangelist, on Click Once Technology with Visual Studio 2005. For the last PDC I wrote the lab for Click Once Technology using VB.NET Whidbey, so I had seen this technology before and was somewhat familiar with it. However, what I saw on Saturday was much more complete and impressive. It is a huge improvement over One Touch Deployment. One of the cool things is that you can actually set up your debugging environment to simulate the availability/unavailability of permissions for your application. This feature will really help developers make sure of the permissions that are needed by their applications before deployment.