Back to description
New technologies force change, nowhere more so than in computers and software. Occasionally, a new technology is so innovative... more
New technologies force change, nowhere more so than in computers and software. Occasionally, a new technology is so innovative that it forces us to challenge our most fundamental assumptions. In the computing industry, the latest such technology is the Internet. It has forced us to rethink how software should be created, deployed, and used.
However, that process takes time. Usually, when a powerful new technology comes along, it is first simply strapped onto existing platforms. So it has been for the Internet. Before the advent of Microsoft .NET, developers used older platforms with new Internet capabilities “strapped on.” The resulting systems worked, but they were expensive and difficult to produce, hard to use, and difficult to maintain.
Realizing this several years ago, Microsoft decided it was time to design a new platform from the ground up specifically for the post-Internet world. The result is called .NET. It represents a turning point in the world of Windows software for Microsoft platforms. Microsoft has staked its future on .NET and has publicly stated that henceforth almost all its research and development will be done on this platform. It is expected that, eventually, almost all Microsoft products will be ported to the .NET platform.
Microsoft is now at version 3.0 of the Microsoft .NET Framework, and the development environment associated with this version is called Visual Studio 2005. The version of Visual Basic in this version is thus called Visual Basic 2005, and this book is about using Visual Basic 2005 with the .NET Framework 3.0.
... less
This chapter looks at the core elements that make up Visual Basic. Every software development language has unique elements... more
This chapter looks at the core elements that make up Visual Basic. Every software development language has unique elements of syntax and behavior. In Visual Basic 2005, many of these elements have evolved since the original Basic and the decade that’s passed since it was introduced. Accordingly, Visual Basic has its origins in traditional procedural-based programming languages.
However, with the release of Visual Basic for .NET, Visual Basic completed a paradigm shift that began several releases earlier. With .NET, the Visual Basic language was truly extended to reference object-oriented development. The object paradigms extend what we’ll call the core elements of the language. Therefore, while a very brief introduction to the existence of classes and objects within the language is presented in this chapter, the key concepts of object-oriented development are presented in detail in Chapters 3 and 4.
This chapter focuses on the core elements of the language and answers questions those not familiar with Visual Basic might ask, such as where semicolons should be placed. The areas of focus for this chapter include the following:
Initial syntax and keywords to understand the basic language elements
Value versus reference types
Primitive types
Value types (structures)
Reference types (classes)
Boxing
Parameter passing ByVal and ByRef
ByVal
ByRef
Datatype conversions
Commands: If Then Else, Select Case, For Each, For Next, Do While
If Then Else
Select Case
For Each
For Next
Do While
The main goal of this chapter is to familiarize you with Visual Basic. The chapter begins by looking at some of the keywords and language syntax you need. Experienced developers will probably gloss over this information, as this is just a basic introduction to working with Visual Basic. After this, the chapter discusses value types and reference types, explaining the underlying difference between how these objects are stored. This is important information for understanding concepts such as boxing and generics. The chapter then provides a clear definition of a logical grouping of objects called primitive types. Finally, it discusses details of value and reference objects and how they are used, moving on to some common command and control statements for Visual Basic.
Visual Basic supports the four major defining concepts required for a language to be fully object-oriented: ... more
Visual Basic supports the four major defining concepts required for a language to be fully object-oriented:
AbstractionAbstraction is merely the ability of a language to create “black box” code, to take a concept and create an abstract representation of that concept within a program. A Customer object, for instance, is an abstract representation of a real-world customer. A DataTable object is an abstract representation of a set of data.
Customer
DataTable
EncapsulationThis is the concept of a separation between interface and implementation. The idea is that you can create an interface (Public methods, properties, fields, and events in a class), and, as long as that interface remains consistent, the application can interact with your objects. This remains true even when you entirely rewrite the code within a given methodthus, the interface is independent of the implementation. Encapsulation enables you to hide the internal implementation details of a class. For example, the algorithm you use to compute pi might be proprietary. You can expose a simple API to the end user, but hide all the logic used by the algorithm by encapsulating it within your class.
Public
PolymorphismPolymorphism is reflected in the ability to write one routine that can operate on objects from more than one classtreating different objects from different classes in exactly the same way. For instance, if both Customer and Vendor objects have a Name property, and you can write a routine that calls the Name property regardless of whether you’re using a Customer or Vendor object, then you have polymorphism.
Vendor
Name
Visual Basic supports polymorphism in two waysthrough late binding (much like Smalltalk, a classic example of a true object-oriented language) and through the implementation of multiple interfaces. This flexibility is very powerful and is preserved within Visual Basic.
InheritanceInheritance is the idea that a class can gain the preexisting interface and behaviors of an existing class. This is done by inheriting these behaviors from the existing class through a process known as subclassing.
Then next chapter discusses these four concepts in detail; this chapter focuses on the syntax that enables you to utilize these concepts.
Visual Basic is also a component-based language. Component-based design is often viewed as a successor to object-oriented design, so component-based languages have some other capabilities. These are closely related to the traditional concepts of object orientation:
Multiple interfacesEach class in Visual Basic defines a primary interface (also called the default or native interface) through its Public methods, properties, and events. Classes can also implement other, secondary interfaces in addition to this primary interface. An object based on this class has multiple interfaces, and a client application can choose with which interface it will interact with the object.
Assembly (component) level scopingNot only can you define your classes and methods as Public (available to anyone), Protected (available through inheritance), and Private (available only locally), but you can also define them as Friendmeaning they are available only within the current assembly or component. This is not a traditional object-oriented concept, but is very powerful when designing component-based applications.
Protected
Private
Friend
In this chapter, you’ll explore the creation and use of classes and objects in Visual Basic. You won’t get too deeply into code, but it is important that you spend a little time familiarizing yourself with basic object-oriented terms and concepts.
Visual Basic is a fully object-oriented language. Chapter 3 covered the basics of creating classes and objects,... more
Visual Basic is a fully object-oriented language. Chapter 3 covered the basics of creating classes and objects, including the creation of methods, properties, events, operators, and instance variables. You’ve seen the basic building blocks for abstraction, encapsulation, and polymorphismconcepts discussed in more detail at the end of this chapter. The final major techniques you need to understand are inheritance and the use of multiple interfaces.
Inheritance is the idea that you can create a class that reuses methods, properties, events, and variables from another class. You can create a class with some basic functionality, and then use that class as a base from which to create other, more detailed, classes. All these derived classes will have the same common functionality as that base class, along with new, enhanced, or even completely changed functionality.
This chapter covers the syntax that supports inheritance within Visual Basic. This includes creating the base classes from which other classes can be derived, as well as creating those derived classes.
Visual Basic also supports a related concept: multiple interfaces. As shown in Chapter 3, all objects have a native or default interface, which is defined by the public methods, properties, and events declared in the class. In the .NET environment, an object can have other interfaces in addition to this native interfacein other words, .NET objects can have multiple interfaces.
These secondary interfaces define alternative ways in which your object can be accessed by providing clearly defined sets of methods, properties, and events. Like the native interface, these secondary interfaces define how the client code can interact with your object, essentially providing a “contract” that enables the client to know exactly what methods, properties, and events the object will provide. When you write code to interact with an object, you can choose which of the interfaces you want to use; basically, you’re choosing how you want to view or interact with that object.
This chapter uses relatively basic code examples so that you can focus on the technical and syntactic issues surrounding inheritance and multiple interfaces. The last part of this chapter revisits these concepts using a more sophisticated set of code as you continue to explore object-oriented programming and how to apply inheritance and multiple interfaces in a practical manner.
Keep in mind that just knowing the syntax and learning the tools is not enough to be successful. Successfully applying the object-oriented capabilities of Visual Basic to create applications requires an understanding of object-oriented programming. This chapter also applies Visual Basic’s object-oriented syntax, showing how it enables you to build object-oriented applications. It further discusses the four major object-oriented conceptsabstraction, encapsulation, polymorphism, and inheritance. By the end of this chapter, you’ll understand how these concepts can be applied in your design and development to create effective object-oriented applications.
You’ve seen how to create simple applications and looked at how to create classes. Now it’s time not only... more
You’ve seen how to create simple applications and looked at how to create classes. Now it’s time not only to start tying these elements together, but also to learn how to dispose of some of the classes that you have created. The architects of .NET realized that all procedural languages require certain base functionality. For example, many languages ship with their own runtime that provides features such as memory management, but what if, instead of each language shipping with its own runtime implementation, all languages used a common runtime? This would provide languages with a standard environment and access to all of the same features. This is exactly what the common language runtime (CLR) provides.
The CLR manages the execution of code on the .NET platform. .NET provided Visual Basic developers better support for many advanced features, including operator overloading, implementation inheritance, threading, and the ability to marshal objects. Building such features into a language is not trivial. The CLR enabled Microsoft to concentrate on building this plumbing one time and then reuse it across multiple different programming languages. Because the CLR supports these features and because Visual Basic is built on top of the CLR, Visual Basic can use these features. The result is that, going forward, Visual Basic is the equal of every other .NET language, with the CLR eliminating many of the shortcomings of the previous versions of Visual Basic.
Visual Basic developers can view the CLR as a better Visual Basic runtime. However, this runtime, unlike the old standalone Visual Basic runtime, is common across all of .NET regardless of the underlying operating system. Thus, the functionality exposed by the CLR is available to all .NET languages; more important, all of the features available to other .NET languages via the CLR are available to Visual Basic developers. Additionally, as long as you develop using managed codecode that runs in the CLRyou’ll find that it doesn’t matter whether your application is installed on a Windows XP client or Vista client; your application will just run. The CLR provides an abstraction layer away from the details of the operating system.
This chapter gets down into the belly of the application runtime environment, not to examine how .NET abstracts you away from the operating system, but instead to look at some specific features related to how you build applications that run against the CLR. This includes an introduction to several basic elements of working with applications that run in the CLR, including the following:
Elements of a .NET application
Versioning and deployment
Integration across .NET languages
Microsoft Intermediate Language (MSIL)
Memory management and the Garbage Collector (GC)
Developers usually build their applications in the English language. Then, as the audience for the application expands,... more
Developers usually build their applications in the English language. Then, as the audience for the application expands, they realize the need to globalize the application. Of course, the ideal is to build the application to handle an international audience right from the startbut in many cases this may not be possible because of the extra work it requires.
With the release of .NET Framework 2.0, a considerable effort has been made to address the internationalization of Web applications. Changes to the API, the addition of capabilities to the server controls, and even Visual Studio itself equip you to do the extra work required to bring your application to an international audience. This chapter takes a look at some of the important items to consider when building your applications for the world.
One of the things developers often need to do is create new types for their programs. Early attempts at type creation... more
One of the things developers often need to do is create new types for their programs. Early attempts at type creation led to user-defined types, or the use of the VB Structure statement. Another approach is to use classes and objects to create new types. With the release of the .NET Framework 2.0, another approach is to use generics.
Structure
Generics refers to the technology built into the .NET Framework 2.0 that enables you to define a code template and then declare variables using that template. The template defines the operations that the new type can perform; and when you declare a variable based on the template, you are creating a new type. The benefit of generics over structures or objects is that a generic template makes it easier for your new types to be strongly typed. Generics also make it easier to reuse the template code in different scenarios.
The primary motivation for adding generics to .NET was to enable the creation of strongly typed collection types. Because generic collection types are strongly typed, they are significantly faster than the previous inheritance-based collection model. Anywhere you presently use collection classes in your code, you should consider revising that code to use generic collection types instead.
Visual Basic 2005 allows not only the use of preexisting generics, but also the creation of your own generic templates. Because the technology to support generics was created primarily to build collection classes, it naturally follows that you might create a generic collection anytime you would otherwise build a normal collection class. More specifically, anytime you find yourself using the Object datatype, you should instead consider using generics.
Object
This chapter begins with a brief discussion of the use of generics, followed by a walkthrough of the syntax for defining your own generic templates.
Even if you didn’t realize it, you’ve been using namespaces since Chapter 2. For example,... more
Even if you didn’t realize it, you’ve been using namespaces since Chapter 2. For example, System, System.Diagnostics, and System.Windows.Forms are all namespaces contained within the .NET Framework. Namespaces are an easy concept to understand, but this chapter puts the ideas behind them on a firm footingand clears up any misconceptions you might have about how they are used and organized.
System
System.Diagnostics
System.Windows.Forms
If you’re familiar with COM, you’ll find that the concept of namespaces is the logical extension of programmatic identifier (ProgID) values. For example, the functionality of Visual Basic 6’s FileSystemObject is now mostly encompassed in .NET’s System.IO namespace, though this is not a one-to-one mapping. However, namespaces are about more than a change in name; they represent the logical extension of the COM naming structure, expanding its ease of use and extensibility.
ProgID
FileSystemObject
System.IO
In addition to the traditional System and Microsoft namespaces (for example, used in things such as Microsoft’s Web Services Enhancements), .NET Framework 2.0 introduces a new way to get at some tough-to-find namespaces using the new My namespace. The My namespace is a powerful way of “speed-dialing” specific functionalities in the base.
Microsoft
My
This chapter covers the following:
What namespaces are
Which namespaces are used in Visual Studio 2005 projects by default
Referencing namespaces and using the Imports statement
Imports
How the compiler searches for class references
How to alias namespaces
Creating your own namespaces
Using the new My namespace
All professional-grade programs need to handle unexpected conditions. In programming languages before Microsoft .NET,... more
All professional-grade programs need to handle unexpected conditions. In programming languages before Microsoft .NET, this was often called error handling. Unexpected conditions generated error codes, which were trapped by programming logic that took appropriate action.
The common language runtime in .NET does not generate error codes. When an unexpected condition occurs, the CLR creates a special object called an exception. This object contains properties and methods that describe the unexpected condition in detail and communicate various items of useful information about what went wrong.
Because .NET deals with exceptions instead of errors, the term “error handling” is seldom used in the .NET world. Instead, the term “exception handling” is preferred. This term refers to the techniques used in .NET to detect exceptions and take appropriate action.
This chapter covers how exception handling works in Visual Basic 2005. There are many improvements over pre-.NET versions of Visual Basic. This chapter discusses the common language runtime (CLR) exception handler in detail and the programming methods that are most efficient in catching errors. Specifically, this chapter covers the following:
A brief review of error handling in Visual Basic 6 (VB6)
The general principles behind exception handling
The Try...Catch...Finally structure, the Exit Try statement, and nested Try structures
Try...Catch...Finally
Exit
Try
The exception object’s methods and properties
Capabilities in Visual Studio .NET to work with exceptions
Error and trace logging and how you can use these methods to obtain feedback on how your program is working
You’ll begin with a quick review of error handling in previous versions of Visual Basic to use as a reference point. Then you will learn new ways to handle exceptions in .NET.
ADO.NET 1.x was the successor to ActiveX Data Objects 2.6 (ADO). The main goal of ADO.NET 1.x... more
ADO.NET 1.x was the successor to ActiveX Data Objects 2.6 (ADO). The main goal of ADO.NET 1.x was to enable developers to easily create distributed, data-sharing applications in the .NET Framework. The main goals of ADO.NET 2.0 are to improve the performance of existing features in ADO.NET 1.x, to provide easier use, and to add new features without breaking backward compatibility.
Note
Throughout this chapter, when ADO.NET is mentioned without a version number after it (that is, 1.x or 2.0), this means that the statement applies to all versions of ADO.NET.
ADO.NET 1.x was built upon industry standards such as XML, and it provided a data access interface to communicate with data sources such as SQL Server and Oracle. ADO.NET 2.0 builds upon these concepts, while increasing performance. Applications can use ADO.NET to connect to these data sources and retrieve, manipulate, and update data. ADO.NET 2.0 does not break any compatibility with ADO.NET 1.x; it only adds to the stack of functionality.
In solutions that require disconnected or remote access to data, ADO.NET 2.0 uses XML to exchange data between programs or with Web pages. Any component that can read XML can make use of ADO.NET components. A receiving component does not even have to be an ADO.NET component if a transmitting ADO.NET component packages and delivers a data set in an XML format. Transmitting information in XML-formatted data sets enables programmers to easily separate the data-processing and user interface components of a data-sharing application onto separate servers. This can greatly improve both the performance and maintainability of systems that support many users.
For distributed applications, ADO.NET 1.x proved that the use of XML data sets provided performance advantages relative to the COM marshaling used to transmit disconnected data sets in ADO. Since transmission of data sets occurred through XML streams in a simple text-based standard accepted throughout the industry, receiving components did not require any of the architectural restrictions required by COM. XML data sets used in ADO.NET 1.x also avoided the processing cost of converting values in the Fields collection of a Recordset to datatypes recognized by COM. Virtually any two components from different systems can share XML data sets provided that they both use the same XML schema for formatting the data set. This continues to be true in ADO.NET 2.0, but the story gets better. The XML integration in ADO.NET 2.0 is even stronger now, and extensive work was done to improve the performance of the DataSet object, particularly in the areas of serialization and memory usage.
Recordset
DataSet
ADO.NET also supports the scalability required by Web-based data-sharing applications. Web applications must often serve hundreds, or even thousands, of users. By default, ADO.NET does not retain lengthy database locks or active connections that monopolize limited resources. This allows the number of users to grow with only a small increase in the demands made on the resources of a system.
In this chapter, you will see that ADO.NET 2.0 is a very extensive and flexible API for accessing many types of data, and because ADO.NET 2.0 is an incremental change to ADO.NET 1.x, all previous ADO.NET knowledge already learned can be leveraged. In fact, to get the most out of this chapter you should be fairly familiar with ADO.NET 1.x and the entire .NET Framework 1.x.
This chapter demonstrates how to use the ADO.NET 2.0 object model in order to build flexible, fast, scalable data access objects and applications. Specifically, it covers the following:
The ADO.NET 2.0 architecture
Some of the new features offered in ADO.NET 2.0, specifically batch updates, DataSet performance improvements, and asynchronous processing
Working with the Common Provider Model
Building a data access component
This chapter describes how you can generate and manipulate Extensible Markup Language (XML) using Visual Basic 2005.... more
This chapter describes how you can generate and manipulate Extensible Markup Language (XML) using Visual Basic 2005. However, using XML in Visual Basic is a vast area to cover (more than possibly could be covered in a chapter). The .NET Framework exposes five XML-specific namespaces that contain over a hundred different classes. In addition, dozens of other classes support and implement XML-related technologies, such as ADO.NET, SQL Server, and BizTalk. Consequently, this chapter focuses on the general concepts and the most important classes.
Visual Basic relies on the classes exposed in the following XML-related namespaces to transform, manipulate, and stream XML documents:
System.Xml provides core support for a variety of XML standards (including DTD, namespace, DOM, XDR, XPath, XSLT, and SOAP).
System.Xml.Serialization provides the objects used to transform objects to and from XML documents or streams using serialization.
System.Xml.Serialization
System.Xml.Schema provides a set of objects that enable schemas to be loaded, created, and streamed. This support is achieved using a suite of objects that support the in-memory manipulation of the entities that compose an XML schema.
System.Xml.Schema
System.Xml.XPath provides a parser and evaluation engine for the XML Path Language (XPath).
System.Xml.XPath
System.Xml.Xsl provides the objects necessary when working with Extensible Stylesheet Language (XSL) and XSL Transformations (XSLT).
System.Xml.Xsl
The XML-related technologies utilized by Visual Basic include other technologies that generate XML documents and enable XML documents to be managed as a data source:
ADOThe legacy COM objects provided by ADO have the ability to generate XML documents in stream or file form. ADO can also retrieve a previously persisted XML document and manipulate it. (Although ADO is not used in this chapter, ADO and other legacy COM APIs can be accessed seamlessly from Visual Basic.)
ADO.NETThis uses XML as its underlying data representation: The in-memory data representation of the ADO.NET DataSet object is XML; the results of data queries are represented as XML documents; XML can be imported into a DataSet and exported from a DataSet. (ADO.NET is covered in Chapter 10.)
SQL Server 2000XML-specific features were added to SQL Server 2000 (FOR XML queries to retrieve XML documents and OPENXML to represent an XML document as a rowset). Visual Basic can use ADO.NET to access SQL Server’s XML-specific features (the documents generated and consumed by SQL Server can then be manipulated programmatically). Recently, Microsoft also released SQLXML, which provides an SQL Server 2000 database with some excellent XML capabilities, such as querying a database using XQuery, getting back XML result sets from a database, working with data just as if it were XML, taking huge XML files and having SQLXML convert them to relational data, and much more. SQLXML enables you to perform these functions and more via a set of managed .NET classes. You can download SQLXML free from the Microsoft SQLXML website at http://msdn.microsoft.com/sqlxml.
FOR XML
OPENXML
http://msdn.microsoft.com/sqlxml
SQL Server 2005SQL Server has now been modified with XML in mind. SQL Server 2005 can natively understand XML because it is now built into the underlying foundation of the database. The ability to query and understand XML documents is a valuable addition to this database server. SQL Server 2005 also comes in a lightweight (and free) version called SQL Server Express Edition.
This chapter makes sense of this range of technologies by introducing some basic XML concepts and demonstrating how Visual Basic, in conjunction with the .NET Framework, can make use of XML. Specifically, you will
Learn the rationale behind XML.
Look at the namespaces within the .NET Framework class library that deal with XML and XML-related technologies.
Take a closer look at some of the classes contained within these namespaces.
Gain an overview of some of the other Microsoft technologies that utilize XML, particularly SQL Server and ADO.NET.
At the end of this chapter, you will be able to generate, manipulate, and transform XML using Visual Basic.
This chapter covers the basics of security and cryptography. It begins with a brief discussion of the .NET Framework’s... more
This chapter covers the basics of security and cryptography. It begins with a brief discussion of the .NET Framework’s security architecture, because this affects all the solutions you may choose to implement.
The .NET Framework provides you with additional tools and functionality with regard to security. You now have the System.Security.Permissions namespace, which enables you to control code access permissions along with role-based and identity permissions. Through your code, you can control access to objects programmatically, as well as receive information on the current permissions of objects. This security framework will assist you in determining whether you have permissions to run your code, instead of getting halfway through execution and having to deal with permission-based exceptions. This chapter covers the following:
System.Security.Permissions
Concepts and definitions
Permissions
Roles
Principals
Code access permissions
Role-based permissions
Identity permissions
Managing permissions
Managing policies
Cryptography
Cryptography is the cornerstone of the .NET Web Services security model, so the second half of this chapter discusses the basis of cryptography and how to implement it. Specifically, it covers the following:
Hash algorithms
SHA
MD5
Secret key encryption
Public key cryptography standard
Digital signatures
Certification
Secure Sockets Layer communications
Let’s begin by looking at some security concepts and definitions.
Tip
As always, the code for this chapter is available for download from www.wrox.com, which you may want in order to follow along.
www.wrox.com
In theory, it’s possible to work with Visual Basic without Visual Studio 2005. In practice,... more
In theory, it’s possible to work with Visual Basic without Visual Studio 2005. In practice, however, the two are rather inseparable; without a version of Visual Studio 2005, you’re forced to work from the command line to create project files by hand and make calls to the associated compilers and related tools necessary to build your application. Thus, while it is possible and, as shown in Chapter 17, sometimes even necessary, to work outside the Visual Studio 2005 Integrated Development Environment (IDE), Visual Studio 2005 is the preferred environment for developing Visual Basic applications.
With the release of Visual Studio 2005, Microsoft expanded on the different versions of Visual Studio available for use. Unlike the early versions, they’ve expanded what we’ll call the high-end and low-end packages associated with Visual Studio. At the low-cost end, currently free, is Visual Basic 2005 Express Edition. This tool enables you to build desktop applications with Visual Basic only. At the high end, Microsoft offers Visual Studio Team System, available only with a high-cost MSDN subscription, which includes many tools that help improve collaboration between developers.
Of course, the focus of this chapter is how Visual Studio enables you to use Visual Basic to build applications geared toward “better, faster, cheaper” business goals. To this end, we’ll be examining features of Visual Studio starting with those in the Core Visual Basic 2005 Express Edition and building up to the full Visual Studio Team Suite. Topics include the following:
Versions of Visual Studio
Project templates
Project propertiesapplication, compilation, debug, etc.
Forms as classes
Setting form properties
IntelliSense, code expansion, and code snippets
Selecting a runtime environment
Debugging
Recording and using macros
Class Designer
Visual Studio tools for Office
Team SystemTeam Suite Client Tools
Team Foundation ServerTeam Explorer
This chapter provides an overview of many of the capabilities of Visual Studio 2005, with a brief introduction to the features available by using one of the more feature-rich versions of Visual Studio. The goal is to demonstrate how Visual Studio makes you, as a developer, more productive and successful.
While most of the relationship between a developer and an SQL Server relates to querying or saving data,... more
While most of the relationship between a developer and an SQL Server relates to querying or saving data, SQL Server 2005 created a new way of working with databases. SQL Server 2005 added integration with the .NET Framework. This provided two main benefits. First, you can use Visual Basic to create elements in the database, such as user-defined types, stored procedures, and functions. These objects may work alone or in concert with the normal Transact-SQL objects. Second, you can expose Web Services from your databases, enabling .NET and other client applications to execute code on the database.
Transact-SQL (T-SQL), while a well-featured language, lacks a number of features that are common in general-purpose languages such as Visual Basic. VB includes better support for looping and conditional statements than T-SQL. In addition, the .NET Framework is available for use with Visual Basic, meaning you have access to tools for network access, string handling, mathematical processing, internationalization, and more. If your stored procedures need access to features such as these, then it may be beneficial to look at using VB, not T-SQL.
This chapter describes how and, possibly more important, why you can use Visual Basic to create these objects in SQL Server 2005. It covers how you can adapt existing data access code to run within the database, and leverage the common language runtime. Finally, the chapter describes the new capability of hosting Web Services within SQL Server, and how you can create these Web Services using Visual Basic.
Windows Forms is the part of the .NET Framework base classes used to create user interfaces for local applications,... more
Windows Forms is the part of the .NET Framework base classes used to create user interfaces for local applications, often called Win32 clients. It is dramatically improved over the forms and controls available in pre-.NET versions of Visual Basic. Although some familiar controls have been retired, no significant functionality has been lost, and a lot of new capabilities have been added.
Windows Forms uses the version number of the related .NET Framework. Thus, the version in Visual Basic 2005 is Windows Forms 2.0. That version number is retained even for .NET Framework version 3.0, because no changes were made to Windows Forms in that version. This chapter sometimes refers to the version number to emphasize differences from the versions included in Visual Basic 2002 and 2003. Those versions are Windows Forms 1.0 and 1.1, respectively.
After explaining why Windows Forms is an important user interface option for .NET applications, this chapter starts its technical content by summarizing the changes in Windows Forms 2.0. This enables those with some experience in previous versions of Windows Forms to quickly identify key changes.
Then the chapter looks at forms, controls, and their behaviors, with emphasis on those elements that are most important for routine application development. Windows Forms is one of the larger namespaces in .NET, so a complete discussion is beyond the scope of this chapter. Instead, this chapter highlights those things developers need to know first.
Chapter 16 includes more advanced treatment of certain aspects of Windows Forms. After gaining a basic understanding of the key capabilities in this chapter, you’ll be ready to go on to the more advanced concepts in that chapter.
The previous chapter discussed the basics of Windows Forms 2.0. These capabilities are sufficient for straightforward... more
The previous chapter discussed the basics of Windows Forms 2.0. These capabilities are sufficient for straightforward user interfaces for systems written in VB 2005, along with the built-in capabilities of forms and controls available in Windows Forms 2.0.
However, as applications become larger and more complex, it becomes more important to use the advanced capabilities of the .NET environment to better structure the application. Poorly structured large systems tend to have redundant code. Repeated code patterns end up being used (in slightly different variations) in many, many places in an application, which has many bad side effectslonger development time, less reliability, more difficult debugging and testing, and tougher maintenance.
Examples of needs that often result in repeated code include making sure that fields are entered by the user, that the fields are formatted correctly, and that null fields in the database are handled correctly. Proper object-oriented design can encapsulate such functionality, making it unnecessary to use repeated code.
null
In VB6 and earlier systems, the techniques available to reduce redundant code were limited. You could write functions to be accessed from various places, for example, and you could write UserControls to encapsulate some functionality.
UserControl
Your options in Visual Basic 2005 are much broader. Using the full object-oriented capabilities of the .NET environment, plus additional capabilities specific to Windows Forms programming, you can componentize your logic, allowing the same code to be used in numerous places in your application.
This chapter discusses techniques for componentizing code in Windows Forms applications. It is assumed that you have already read Chapters 3 and 4 on inheritance and other object-oriented techniques available in .NET before working with this chapter.
Windows Presentation Foundation (WPF)previously known as Avalonis the next generation for user interfaces,... more
Windows Presentation Foundation (WPF)previously known as Avalonis the next generation for user interfaces, and it’s a key architectural component in the .NET 3.0 Framework. This chapter introduces you to the WPF programming model and discusses key elements you’ll need to know in working with WPF. Rest assured you will be creating applications that leverage the features of WPF in the future. It may not happen until after the release of developer productivity tools supporting it, but eventually it will replace the many and varied user interface models that currently exist.
The libraries that make up WPF were released in conjunction with the release of Windows Vistanot the commercial and much-publicized public release of Vista in January 2007, but rather the initial release of Vista to enterprise partners in November of 2006. The libraries shipped with Vista and coincidentally with Microsoft Office 2007, but what you may or may not notice is the lack of development tools at the same time. Microsoft has managed to follow a software deployment pattern that’s proved successful for many large application environments: first release a library that introduces new features, and then build and release the tools and software that can truly leverage the classes in the new library.
The result of ordering these items is a little like following the ready-aim-fire model (vs. ready-fire-aim). First, Microsoft looked into its market and systems and found a major need. It prepared a design to solve this need and readied a solution. Next, it took aim at making sure the solution (WPF) would stand up, and at stabilizing that solution so it could have a valid target for the need created by the solution. That target is the tools needed to productively leverage these new libraries, and Microsoft can now aim these tools at a fixed target, the released library, as opposed to a moving target.
In the past, as we saw with .NET 2.0 and the release of Visual Studio 2005, having both a tool suite and the libraries it supports changing at the same time caused some difficulties. Anyone can tell you it’s much easier to hit a fixed target than a moving one. Aiming at a moving target for .NET 2.0 resulted in delivery challengeswhich in retrospect were probably costly even to a world-class development organization such as Microsoft. However, with .NET 3.0, the libraries are available now, even as Microsoft continues to build not only enhancements to its current development suiteVisual Studiobut also a new suite of development tools, the Expressions suite.
This chapter takes you through several key areas, including the following:
What, where, why, howWPF strategy
WPF elements and compatibility
Creating a WPF application
Introduction to XAML
Visual Studio integration
Expression suite of tools
Keep in mind that, like all the new capabilities being introduced with .NET 3.0, WPF is still at an early stage, on what is sometimes called the “bleeding edge” of technology. There are fewer examples of working with this technology; and the tools, where they exist, are still in beta. This means that if you try to leverage the technology now, you run the risk of having that decision come back to bite you when you hit a wall.
Additionally, the knowledge required to work with this technology is still more advanced; you’ll see that we work from the command line for several of the examples, and you need to understand some of the underpinnings of Visual Studio 2005 and how it compiles your Visual Basic applications. Eventually, this will all be hidden under the automated processes of Visual Studio, but for now be prepared to delve deeply into this technology. Accordingly, it’s appropriate for you to understand why WPF is going to be such a big deal as we move forward.
Windows Presentation Foundation (WPF) was introduced in the last chapter as Microsoft’s next-generation solution... more
Windows Presentation Foundation (WPF) was introduced in the last chapter as Microsoft’s next-generation solution to graphical user-interface development. In terms of user interfaces, the transition to this new model will be similar in significance and paradigm shift to the shift from COM-based Visual Basic to Visual Basic .NET. In other words, the paradigms and syntax familiar to developers of Windows applications are changing, and most of the changes are not backwardly compatible. Currently, there are no plans for an automated migration from any existing user-interface paradigm, forms, or Web, to the new WPF format.
Yes, again you will need to transition existing application source code to a new technology paradigm. Perhaps not this year or next, but at some point the WPF paradigm will be used to update the look and feel of existing applications. How will this transition compare to the last major .NET-related transitionthe one from COM? Whereas Visual Studio includes a tool to aid in migrating code from the COM-based world to .NET, there will not be a migration tool provided to transition existing user interfaces to WPF. You might consider this to be a good thing, considering the history of the current migration tools. However, Microsoft is providing libraries that enable user-interface developers to integrate these two interface models. In the long run, this integration will probably go the way of COM-Interop, which is to say it will be available but carry such a stigma that people will only use it when absolutely necessary.
This chapter takes you through several key areas of Windows Forms Integration, including the following:
Forms integrationCrossbow
Using WPF controls in Windows Forms
Using Windows Forms controls in WPF
Interop limitations
This is a fairly short list, but you might want to consider reviewing some of the Interop limitations. After all, nothing clarifies some of the differences between the capabilities of these two user-interface platforms quite like a look at the limitations when they are viewed together. Just as with COM-Interop, the key for this tool is to help you, the developer, transition your application from Windows Forms to WPF over time, while working with time and budget constraints that all developers face and potentially waiting on the availability of a control that isn’t available in the .NET 3.0 version of WPF.
The evolution of ASP.NET continues! The progression from Active Server Pages 3.0 to ASP.NET 1.0 was revolutionary,... more
The evolution of ASP.NET continues! The progression from Active Server Pages 3.0 to ASP.NET 1.0 was revolutionary, to say the least, and we are here to tell you that the evolution from ASP.NET 1.0/1.1 to ASP.NET 2.0 is just as exciting and dramatic.
The introduction of ASP.NET 1.0/1.1 changed the Web programming model; but ASP.NET 2.0 is just as revolutionary in the way it increases productivity. The primary goal of ASP.NET 2.0 is to enable you to build powerful, secure, and dynamic applications using the least possible amount of code. Although this book covers the new features provided by ASP.NET 2.0, it also covers most of what the ASP.NET technology offers.
ASP.NET is an exciting technology. It enables the creation and delivery of remotely generated applications (Web applications)... more
ASP.NET is an exciting technology. It enables the creation and delivery of remotely generated applications (Web applications) accessible via a simple browsera container that many are rather familiar with. The purpose of Web-based applications (in our case, ASP.NET applications) is to deliver only a single instance of the application to the end user over HTTP. This means that the end users viewing your application will always have the latest and greatest version at their disposal. Because of this, many companies today are looking at ASP.NET to not only deliver the company’s website, but also to deliver some of their latest applications for their employees, partners, and customers.
The last chapter took a look at some of the basics of ASP.NET 2.0. This chapter continues on that path and shows you some additional and exciting technologies that you’ll find in ASP.NET 2.0, including master pages, configuration, data access, and more.
This chapter touches upon many topics, as ASP.NET has become a rather large offering with many possibilities and capabilities. Sit back, pull up that keyboard, and enjoy!
By now, you’ve probably developed some programs in .NET, so you’ve seen the modules produced by the .NET compilers,... more
By now, you’ve probably developed some programs in .NET, so you’ve seen the modules produced by the .NET compilers, which have file extensions of .dll or .exe. Most .NET modules are DLLs, including class libraries and those that serve as code-behind for ASP.NET. Windows applications, console applications, and Windows Services are examples of .NET modules that are executables and thus have an extension of .exe.
dll
exe
These .NET-compiled modules, both DLLs and EXEs, are referred to as assemblies. Assemblies are the unit of deployment in .NET, containing both compiled code and metadata that is needed by the .NET common language runtime (CLR) to run the code. Metadata includes information such as the code’s identity and version, dependencies on other assemblies, and a list of types and resources exposed by the assembly.
Basic development in .NET doesn’t require you to know any more than that. However, as your applications become more complex, and as you begin considering such issues as deployment and maintenance of your code, you need to understand more about assemblies. This chapter addresses that need, including the following:
What assemblies are and how they are used
The general structure of an assembly
How assemblies can be versioned
The global application cache (GAC), including how and when to use it
How assemblies are located and loaded by the CLR
After you are familiar with these essentials, Chapter 22 uses this information to discuss deployment in depth.
One of the significant advantages of .NET over its predecessor, COM, is dramatically improved deployment.... more
One of the significant advantages of .NET over its predecessor, COM, is dramatically improved deployment. NET offers a host of deployment options that were not available for older, COM-based software. These options completely change the economics of deployment. The changes are so important that they can even alter the preferred architecture for a system written in .NET.
Deployment encompasses many activities required to place an application into a production environment. Setting up databases, placing software in appropriate directories on servers, and configuring options for a particular installation are some of the actions that fall under the deployment category. Deployment also includes handling of changes and upgrades to the application.
This chapter discusses the major deployment options for .NET applications. The previous chapter on assemblies should be considered a prerequisite for this chapter, as assemblies are the basic unit of deployment.
First you’ll look at some of the problems that can occur when you deploy applications, along with a number of terms that are used when talking about application deployment. Next is a look at how .NET addresses many of these deployment issues. The remainder of the chapter covers the following:
Creating deployment projects in Visual Studio 2005, which enable initial installation of applications
Deployment of the .NET Framework itself on systems where it does not already reside
Updating applications on servers, including components and ASP.NET applications
Installing and updating Windows Forms applications on client machines with ClickOnce, Microsoft’s proprietary deployment technology
Deployment in .NET is a huge topic, which can’t be adequately covered in one chapter. What this chapter should give you is an understanding of, a basic knowledge of, and the desire to learn more about the options available to you.
However much we try, we just can’t ignore the vast body of technology surrounding Microsoft’s Component Object... more
However much we try, we just can’t ignore the vast body of technology surrounding Microsoft’s Component Object Model, or COM. Over the years, this model has been the cornerstone of so much Microsoft-related development that we have to take a long, hard look at how we are going to integrate all that technology into the new world of .NET.
This chapter begins by taking a brief backward glance at COM, and then compares it with the way that components interact in .NET. It also takes a look at the tools Microsoft provides to help link the two together. Having looked at the theory, you then try it out by building a few example applications. First you take a legacy basic COM object and run it from a Visual Basic 2005 program. Then you repeat the trick with a full-blown ActiveX control. Finally, you run some Visual Basic code in the guise of a COM object.
More information on how to make COM and VB6 code interoperate with the .NET platform can be found in Professional Visual Basic Interoperability: COM and VB6 to .NET (Wiley, 2002).
As all that is done, try to remember one thing: COM is, to a large extent, where .NET came from. In addition, with all the time and resources that have been invested in this technology, it is important to consider the best ways to both maintain these investments and integrate them into new investments being made.
One of the results of the move from 16-bit to 32-bit computing was the ability to write code that made use of threads,... more
One of the results of the move from 16-bit to 32-bit computing was the ability to write code that made use of threads, but although Visual C++ developers have been able to use threads for some time, Visual Basic developers haven’t had a truly reliable way to do so, until now. Previous techniques involved accessing the threading functionality available to Visual C++ developers. Although this worked, actually developing multithreaded code without adequate debugger support in the Visual Basic environment was nothing short of a nightmare.
For most developers, the primary motivation for multithreading is the ability to perform long-running tasks in the background, while still providing the user with an interactive interface. Another common scenario is when building server-side code that can perform multiple long-running tasks at the same time. In that case, each task can be run on a separate thread, enabling all the tasks to run in parallel.
This chapter introduces you to the various objects in the .NET Framework that enable any .NET language to be used to develop multithreaded applications.
While Windows Communication Foundation and Windows Presentation Foundation enjoy much of the attention,... more
While Windows Communication Foundation and Windows Presentation Foundation enjoy much of the attention, the .NET Framework 3.0 also comes with another “Foundation”: Windows Workflow Foundation (usually abbreviated WF). WF can be a powerful tool in developing applications, as it provides a standard means of adding workflow to an application. Workflow refers to the steps involved in an application. Most business applications contain one or more workflows, such as the approval steps in an expense-tracking application, or the steps involved in paying for a cart full of items at an online store. Normally, a workflow is created in code, and is inextricably bound to the application. WF enables developers to graphically build the workflow, keeping it logically separated from the code itself. It also enables the workflow to change as the needs of the business change. These workflows may be as complex as needed, and may integrate human processes or Web Services.
This chapter looks at how you can take advantage of WF in your applications: how you can add and edit workflows, how you can integrate workflows into an existing business process, and how the graphical tools used to build workflows with Visual Studio can help you communicate with business users and avoid errors caused by mistakes in the workflow.
This chapter begins with a short history of multi-tier architecture and network operating systems,... more
This chapter begins with a short history of multi-tier architecture and network operating systems, a discussion of the early days of the network-as-the-computer, and a discussion of where system architecture is heading today. (The reason for this diversion is to understand the rationale behind Web Services.)
Next, this chapter looks at a sample Web Service, and walks through making it accessible to the Internet as well as accessing it from a client applicationboth with the Visual Studio IDE and using command-line tools. From there, the chapter moves on to a key feature of Web Services, the Service Repository, Discovery, and Universal Description, Discovery, and Integration (UDDI) features that enable remote programmers to correctly access Web Services.
Finally, the chapter delves into more in-depth topics during the discussion of the four namespaces found in the .NET Framework class library (System.Web.Services, System.Web.Description, System.Web.Services.Discovery, and System.Web.Services.Protocols) that deal with Web Services and how to utilize them with Visual Basic 2005. Moving on, the chapter discusses topics such as security, transactions, and the downsides of any distributed architecture (including any downsides associated with the Web Services model), followed by a short discussion of where you go from here and how you get there.
System.Web.Services
System.Web.Description
System.Web.Services.Discovery
System.Web.Services.Protocols
Remoting is the .NET technology that enables code in one application domain (AppDomain) to call into the methods and properties... more
Remoting is the .NET technology that enables code in one application domain (AppDomain) to call into the methods and properties of objects running in another application domain. A major use of remoting is in the classic n-tier desktop approach, where presentation code on the desktop needs to access objects running on a server somewhere on the network. Another primary use for remoting is when code in ASP.NET Web Forms or Web Services needs to call objects running on an application server somewhere else on the network. In short, remoting is the technology to use when your n-tier code needs to talk to the business or data tier running on an application server.
Remoting is conceptually somewhat similar to Web Services. Both remoting and Web Services are TCP/IP-based technologies that allow communication between different machines over an IP network. This means that they both pass through firewalls, and they both provide stateless and connectionless communication between machines. These two technologies share a lot of the same principles.
NOTE
It is important to recognize that Microsoft has merged the functionality of remoting, Web Services, enterprise services, and MSMQ (Microsoft Message Queue) into the Windows Communication Foundation (WCF) the next generation of the technologies. You can find more information on WCF in Chapter 30.
When working with XML Web Services, the biggest problem with SOAP is that it is not lightweight. It’s designed with maximum platform interoperability in mind, which puts certain limits on how data can be transferred. For example, imagine that platform A stores integer variables as a 4-byte block of memory, with the lowest-value byte appearing first. Now imagine that platform B also uses a 4-byte block of memory, but this time the highest-value byte appears first. The encoding of the value is different. Without some form of conversion, if you copy that block of bytes from platform A to platform B, then the platforms won’t agree on what the number actually is. In this scenario, one platform thinks it has the number 4, whereas the other thinks that the number is actually 536870912.
536870912
SOAP gets around this problem by representing numbers (and everything else) as strings of ASCII characters since ASCII is a text-encoding standard that most platforms can understand. However, this means that the native binary representations of the numbers have to be converted to text each time the SOAP document has to be constructed. In addition, the values themselves have to be packaged in something that you can read (with a little bit of effort). This leads to two problems: massive bloat (a 4-byte value starts taking hundreds of bytes to store) and wasted CPU cycles used in converting from native encoding to text encoding and back again.
You can live with all these problems if you only want to run your Web Service on, say, Windows 2000, and have it accessed through a client running on a cell phone. SOAP is designed to do this kind of thing. However, if you have a Windows XP desktop application that wants to use objects hosted on a Windows 2000 server (using the same platform), the bloated network traffic and wastage in terms of conversion is sub-optimal at best and ridiculous at worst.
Remoting lets you enjoy the same power of Web Services but without the downside. If you want, you can connect directly to the server over TCP and send binary data without having to do any conversions. If one Windows computer has a 4-byte block of memory holding a 32-bit integer value, you can safely copy the bit pattern to another Windows computer and both will agree on the number. In effect, network traffic sanity is restored and processor time isn’t wasted doing conversions.
Chapter 23 explored the vast hinterland of legacy software known as COM. This chapter looks at “what COM did next”... more
Chapter 23 explored the vast hinterland of legacy software known as COM. This chapter looks at “what COM did next” and how it fits into the world of .NET, in the form of .NET Enterprise Services. You would be forgiven for thinking that Enterprise Services is yet another version of legacy software, except that much of it hasn’t been around for long enough to be considered legacy. However, there is more to it than that. The features made available by Enterprise Services are still very valuable today for creating scalable, distributed applications.
To understand Enterprise Services, go back in time to around 1997 when a number of technologies began to emerge from Microsoft, including Microsoft Transaction Server (MTS), Microsoft Message Queuing (MSMQ), and Microsoft Clustering Services. The aim of these developments was to bring something that had previously been esoteric, specialized, and generally mainframe-based within the scope of standard PC technology, putting these technologies in the hands of developers.
Handling transactions involved a considerable extension to the NT/COM runtime. It also involved the introduction of several new standard COM interfaces, some to be used or implemented by transactional components and some to be used or implemented by the underlying resource managers, such as SQL Server. These additions, along with some other innovations relating to areas such as asynchronous COM, came to be known as COM +.
This chapter explores the .NET Enterprise Services. In particular, it looks at transaction processing and queued components using the classes of the System.EnterpriseServices and System.Transactions namespaces. This is an enormous subject that could easily fill a whole book by itself, so this chapter only scratches the surface of it. However, by the end of the chapter, you will understand how all the pieces fit together. Let’s begin by looking at what transactions are, and how they fit into Visual Basic 2005.
System.EnterpriseServices
System.Transactions
You can find more information about transactions in .NET in Professional VB.NET Transactions (Wiley, 2002).
Just as it is difficult to live your life without talking with people, your applications also need to communicate,... more
Just as it is difficult to live your life without talking with people, your applications also need to communicate, perhaps with other programs or perhaps with hardware devices. As shown throughout this book, you can use a variety of techniques to have your program communicate, including .NET Remoting, Web Services, and Enterprise Services. This chapter looks at yet another way to communicate: using the basic protocols that the Internet and many networks have been built on. You will learn how the classes in System.Net can provide a variety of techniques for communicating with existing applications such as Web or FTP servers, and how you can use them to create your own communication applications.
System.Net
Before you start writing applications using these classes, however, it would be good to get some background on how networks are bolted together, and how machines and applications are identified.
Until now, building components that were required to communicate a message from one point to another was not always the... more
Until now, building components that were required to communicate a message from one point to another was not always the simplest of tasks. This was because there was more than one technology in Microsoft’s belt that you could have used for such an action.
For instance, you could have used ASP.NET Web Services, Web Service Enhancements 3.0 (WSE), MSMQ, Enterprise Services, .NET Remoting, and even the System.Messaging namespace. Each one of these technologies has pros and cons associated with it. ASP.NET Web Services (also known as ASMX Web Services) provided the capability to easily build interoperable Web Services. The WSE enabled you to easily build services that took advantage of some of the WS-* message protocols. MSMQ enabled the queuing of messages, making it easy to work with solutions that were only intermittently connected. Enterprise Services, provided as a successor to COM+, offered an easy means to build distributed applications. .NET Remoting was a fast way to move messages from one .NET application to another. And this is only the Microsoft worldit doesn’t include all the options available in other environments, such as the Java world.
System.Messaging
With these options for a Microsoft developer alone, it can be tough to decide what path to take with the applications you’re trying to build. With this problem in mind, Microsoft has brought forth the Windows Communication Foundation (WCF).
WCF is a new framework for building service-oriented applications. Microsoft wanted to provide its developers with a framework that would provide the fastest means to getting a proper service-oriented architecture up and running. Using the WCF, you will be able to take advantage of all of the items that made the aforementioned distribution technologies powerful. WCF is the answer and the successor to all these other message distribution technologies.
WCF is a new component of the .NET Framework 3.0. Therefore, to work through the examples of this chapter, you need the .NET Framework 3.0 installed on your machine.
Modern, multitasking operating systems often need to run applications that operate in the background and that are independent... more
Modern, multitasking operating systems often need to run applications that operate in the background and that are independent of the user who is logged in. From Windows NT to Windows Vista, such applications are called Windows Services (formerly known as NT Services). The tasks carried out by Windows Services are typically long running and have little or no direct interaction with a user (so they don’t usually have user interfaces). Such applications may be started when the computer is booted and often continue to run until the computer is shut down.
The characteristics of a Windows Service
How to interact with a Windows Service using Visual Studio 2005 and the management applets in the Windows Control Panel
How to create, install, and communicate with a Windows Service using Visual Basic
How to debug a Windows Service from within Visual Studio 2005
As VB6 did not offer direct support for the creation of Windows Services, you might be unfamiliar with such applications. To help you understand the variety of such applications, this chapter examines some scenarios for which a Windows Service application is a good solution.
In today’s network-centric world, it’s very likely that applications will need to work with other computers... more
In today’s network-centric world, it’s very likely that applications will need to work with other computers over a private network, the Internet, or both. This chapter details how to do the following:
Download resources from the Web
Design your own communication protocols
Reuse Internet Explorer in your applications
When the .NET Framework was first introduced, one nice addition for the Visual Basic developer was the inclusion of a... more
When the .NET Framework was first introduced, one nice addition for the Visual Basic developer was the inclusion of a standalone language compiler. This meant you weren’t required to have the Visual Studio .NET 2002 IDE in order to build Visual Basic applications. In fact, you could take the .NET Framework from the Microsoft website (for free), and build Web applications, classes, modules, and more simply using a text editor such as Notepad. You could then take the completed files and compile them using the Visual Basic compiler.
The Visual Basic compiler is included along with the default .NET Framework install. The name of the compiler is vbc.exe and it can be found at
vbc.exe
C:\WINDOWS\Microsoft.NET\Framework\v2.0.[version]\vbc.exe
This appendix provides a short list of VB resources available to you.
... more
Purchase Before purchasing this product, please be sure you have met all software and system requirements, and that you understand any limits placed upon its use.
Return Policy Wrox Chapters on Demand are non-returnable and non-refundable.
Reader Software Wrox Chapters on Demand are offered as PDFs, and they must be viewed using the Adobe Reader. If you do not have the Reader installed, it can be downloaded for free at Adobe.com.
Test Download As Wrox Chapters on Demand purchases are non-returnable, it is advisable that you test your system and software configurations with a free sample download before you place an order.
Usage Rights for a Wrox Chapter on Demand File Any Wrox Chapter on Demand product you purchase from this site will come with certain restrictions that allow Wiley to protect the copyrights of its products. After you purchase and download this title, you:
If you have any questions about these restrictions, you may contact Customer Care at (877) 762-2974 (8 a.m. - 5 p.m. EST, Monday - Friday). If you have any issues related to Technical Support, please contact us at 800-762-2974 (United States only) or 317-572-3994 (International) 8 a.m. - 8 p.m. EST, Monday - Friday).
Related Books
Visual Basic Resources