Chapter 2: Creating Great Windows Applications


Despite more and more developers moving toward creating Web applications as the solution for many of today s business problems, the true power of Windows programs remains ever present.

Windows programs should be considered for several reasons. They re more reactive than Web sites. They allow you more control over what s happening on a computer. And they re better looking. At least, some of them are.

No, the fat client will never die. And, thankfully, the world of VB .NET relies on this, with the Windows application still being the default project type in Visual Studio.

So, just what is a Windows application to Visual Studio .NET? Well, it s a program that runs in Windows and typically consists of one or more forms (called Windows Forms in .NET).

The process of creating a Windows application is pretty simple: create a project, slap a few controls onto a form, change a bundle of properties, respond to events, and add code to glue the whole thing together.

This then compiles down to what we VB6 folk would call an executable . In the world of .NET, this is an assembly, a unit of deployment for the .NET Framework. The term assembly can also be used to refer to DLLs too. (Basically, at least to regular VB .NET projects, your assembly is the main file that s created when you compile your application.)

After you ve compiled, you simply need to distribute your assembly, perhaps alongside any other assemblies referenced in your application. No runtimes required. All you need to ensure is that the other machine has the .NET Framework installed ” and, hey presto!

Okay, so that s how . Now, what .

In this chapter, we ll start by exploring the essentials of creating great Windows applications. Just to clarify, this isn t intended as any sort of tutorial. Rather, it simply recaps the basic points you ll need to know to create regular Windows form-based programs. Although you may find such basic pointers a little nauseating at this stage ” especially if you ve been using VB .NET for a while ”when it comes to the likes of data access, you ll be glad of its reference value.

After the Essentials briefing, we ll move onto the Developer Secrets . These are all those crafty tips and code snippets I ve personally created while programming for .NET over the past three years .

I m not talking about common code here. I m not going to tell you how to fill a TreeView control. That s the job of the help file and MSDN. Rather, these are the real and little-known tricks.

For instance, you ll learn how to check for a previous instance of your application ”especially useful, as the PrevInstance property decided to take a hike. You ll figure how to create an ultra -thin, automatically updating fat client. You ll be given just the code to convert the contents of a RichTextBox control into HTML, then learn how to set up your application to work with Windows Explorer.

Sound interesting? Ready to indulge? Then let s get busy.

The Ultimate VB .NET and ASP.NET Code Book
The Ultimate VB .NET and ASP.NET Code Book
ISBN: 1590591062
EAN: 2147483647
Year: 2003
Pages: 76
Authors: Karl Moore

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: