List of Figures

Chapter 2: Using Visual Basic .NET with Visual Studio .NET

Figure 2-1: My Profile selections for starting Visual Studio .NET for a Visual Basic .NET developer
Figure 2-2: The New Project dialog box with the selection for starting your first Windows application using the Windows Application template
Figure 2-3: The Visual Studio .NET IDE for the test05153 project
Figure 2-4: The New Project dialog box with the selection for starting your first Windows application in the C:\pawvbnet directory
Figure 2-5: The IDE for the ClassLibrary1 project after the compilation of the solution, with the .dll file in the bin folder within the solution
Figure 2-6: The IDE for the InvokeAboutInClassLibrary1 project after the addition of a reference to the ClassLibrary1.dll file and a button to Form1
Figure 2-7: The message box that displays with a return value from the About method in the ClassLibrary1 component
Figure 2-8: An excerpt from the code module behind the form in the InvokeAboutInClassLibrary1 project that illustrates the instantiation of a form
Figure 2-9: A modification to the InvokeAboutInClassLibrary1 project that illustrates the syntax for and use of the Imports keyword
Figure 2-10: The Data Adapter Preview dialog box that lets you preview the data to which a DataAdapter connects without populating a local dataset for a control on the form
Figure 2-11: The Form Designer view of the Jump Start example after the addition of a dataset to the project
Figure 2-12: The Jump Start example showing the data from the Shippers table from the Northwind database in a DataGrid control sorted in alphabetical order by CompanyName

Chapter 3: Visual Basic .NET Fundamentals

Figure 3-1: The message boxes generated when you run the ReferenceValueComparison project
Figure 3-2: Open the Add Reference dialog box to add references to a project for COM objects.
Figure 3-3: The WriteLine method for the Debug class can write strings to the Output window.
Figure 3-4: The DataTypes table in the dbDataTypes Access database file has all 15 Access data types.
Figure 3-5: The Design view for Form1 in the MetaDataLooping project with the ADO.NET connection, data adapter, and dataset objects for the Button3_Click event procedure
Figure 3-6: The Output window results generated by the Button3_Click event procedure from the MetaDataLooping project
Figure 3-7: With the ReDim statement, you can add a new column of values to an existing array while retaining the original values.
Figure 3-8: You can use arrays to consolidate multiple types of data because this output contrasts ADO and .NET Framework data types corresponding to Access data types.
Figure 3-9: After instantiating an object, you can access property values of the objectfor example, for display in a message box. You can also change property values from their initial values (Speedy Express) to new values (anything).
Figure 3-10: When you have multiple instances of a single object class, you can control the property value of individual instances independently of one another.
Figure 3-11: The sequence of message boxes generated by running AddxToLastShipperAndRestore procedure

Chapter 4: Selected Visual Basic .NET Advanced Topics

Figure 4-1: The message box generated when you run the Button1_Click event procedure in the FileProcessingSamples project
Figure 4-2: The sequence of windows presented by an application that lets a user pick an employee whose picture will show on Form1
Figure 4-3: Using Solution Explorer to confirm the addition of files to a project and preview their contents
Figure 4-4: The Visual Studio .NET IDE in the background with a form Load event procedure behind a message box under the control of the event procedure
Figure 4-5: Dragging a Windows Timer component from the Toolboxs Windows Forms tab to a form and then manually changing its properties in the Properties window
Figure 4-6: Two screens from a Windows application with a class library. The class library performs the processing, with the results appearing on the Windows form.
Figure 4-7: A message box showing results from a base class method and property obtained by invoking a derived class method and returning a value from a derived class property
Figure 4-8: The MethodShadowsProperty procedure, which returns the value 8 in its message box when run with default beginning and ending OrderID and SecondOrderID values of 10248 and 10250
Figure 4-9: Two message boxes resulting from two different invocations of the New method for the Rows class
Figure 4-10: The SEH sample, which includes three text boxes for collecting user input to the applications code
Figure 4-11: Dialog box for unhandled exceptions presented by the CLR for a System.OverflowException object
Figure 4-12: Handled exceptions enable your application to remain in control and determine user feedback.
Figure 4-13: Displaying in your application dynamic exception messages that tell the user exactly what to do
Figure 4-14: Creating an Exception instance and then catching it with a Catch clause in a Try block

Chapter 5: Fundamentals of Programming Windows Forms and Controls

Figure 5-1: The process for creating a Load event procedure shell for a form
Figure 5-2: Output window tracking the Load , Closing , and Closed events relative to one another and the New and Dispose procedures
Figure 5-3: The Design view layout of a form before the run-time assignment of Text property settings for the forms buttons
Figure 5-4: Form3 opens alternately with and without its control box.
Figure 5-5: Modeless and modal instances of Form2
Figure 5-6: Clicking Compute in the startup instance of Form3 opens an instance of Form4 that is ready to accept quantities to sum.
Figure 5-7: After clicking the Return Sum button in Figure 5-6, the screen reconfigures to appear like this.
Figure 5-8: The underlying Design view of the Form3 class that appears in two different layouts in the top and bottom forms in Figure 5-7
Figure 5-9: The application for Form5 and Form6 demonstrates approaches to passing values between parent and child form instances.
Figure 5-10: The form layout for the user ID and password validation sample
Figure 5-11: The user ID and password validation sample in action
Figure 5-12: A Design view of the form for the data browsing sample
Figure 5-13: An operational view of the data browsing sample for a move outside the recordset and a normal move to the next record
Figure 5-14: The Design view for Form3 with a ComboBox control to specify the display contents for a couple of TextBox controls and a PictureBox control
Figure 5-15: An operational view of Form3 after it initially opens with a resized form as well as PictureBox and TextBox controls
Figure 5-16: Form4 and Form5 work together in a single application within the FormControlSamples project so that a selection on Form4 determines the entries in the list box on Form5 .
Figure 5-17: A Design view of a form with multiple LinkLabel controls that can serve as a switchboard form
Figure 5-18: The LinkLabel switchboard sample in operation after a click to LinkLabel3

Chapter 6: Programming Windows Forms: Building on Fundamentals

Figure 6-1: The switchboard form for the NavigationandAssignment project
Figure 6-2: The Design view of a form for basic navigation through DataSet elements bound to the Text property of each TextBox control
Figure 6-3: The text box navigation sample based on a dataset in operation with comparison values from the Northwind database
Figure 6-4: The text box navigation sample enhanced with right justification and currency formatting
Figure 6-5: Enabling navigation with a combo box can provide your Visual Basic .NET applications with a popular feature.
Figure 6-6: The DataGrid is initially empty to show that you can dynamically populate and modify the formatting for a DataGrid control on a form with code behind other controls on a form.
Figure 6-7: You can dynamically change the appearance of a DataGrid control.
Figure 6-8: A SQL view of one of three parallel queries created for the Northwind database
Figure 6-9: A Windows form that lets a user populate a DataGrid with one of three different datasets based on various queries in the Northwind database
Figure 6-10: Using simple graphical techniques and elementary Visual Basic .NET code, you can dynamically specify at run time the values to populate a control such as a DataGrid on a Windows form.
Figure 6-11: The switchboard form for the discussion of the Data Form Wizard
Figure 6-12: Design view of a form created with the Data Form Wizard that contains text boxes for browsing and manipulating values
Figure 6-13: Making a change in a DataForm object can update the corresponding record in a table in an Access database after you click the forms Update button.
Figure 6-14: Making a change in an Access Datasheet view propagates to a DataForm object after a user clicks the Load button.
Figure 6-15: Design view of a form created with the Data Form Wizard that contains a DataGrid control for browsing and manipulating values
Figure 6-16: Committing an edit from the DataGrid control is as easy as clicking the Update button.
Figure 6-17: When adding a new row through a DataGrid control, the .NET Framework assigns an autonumber for the row based on the last autonumber column value in the DataGrid control.
Figure 6-18: When you designate two separate data sources in the Data Form Wizard, you can designate a relationship between them to create a main/sub form.
Figure 6-19: Design view of a main/sub form created with the Data Form Wizard
Figure 6-20: A main/sub form when it initially opens (on left) and after the selection of a row in the main form (on right)
Figure 6-21: You can customize the look of a DataForm by dropping and resizing controls.
Figure 6-22: The Design view of a form with three buttons to control and monitor the formatting of a DataGrid control
Figure 6-23: The Design view of a form for controlling navigation and reading grid cell values via the programming of the CurrentCell and CurrentRowIndex properties
Figure 6-24: The sample illustrating the use of the CurrentCell and CurrentRowIndex properties permits navigation via three techniques, including simply clicking a cell.
Figure 6-25: The CurrentCell and CurrentRowIndex property sample enables navigation via buttons at the top of Form3 .
Figure 6-26: The CurrentCell and CurrentRowIndex property sample enables navigation when the user enters a row number in a text box and clicks a button.
Figure 6-27: The CurrentCell and CurrentRowIndex property sample traps invalid navigation to the blank row at the bottom of the grid and repositions the currently selected cell.

Chapter 7: ADO.NET: Concepts and Architecture

Figure 7-1: The ADO.NET Data Provider and dataset elements relative to relational database objects and XML documents
Figure 7-2: A form with a pair of buttons and a connection object created with Visual Studio .NET at design time
Figure 7-3: A message box showing an expanded range of connection string clauses that are available for your use
Figure 7-4: The top message box shows metadata about the number of fields in a result set that a data reader points at, and the bottom message box shows more detailed data about each field in the result set.
Figure 7-5: The Design view of Form5 in the OleDbObjectSamples project (on top) and the operational view after the form initially opens
Figure 7-6: The DataSet object model
Figure 7-7: The sample used to demonstrate dataset coding conventions requires that the user click the buttons in the right order.

Chapter 8: ADO.NET Coding Techniques

Figure 8-1: A Design view and an initial operational view of Form2 in the ADONETSamples project
Figure 8-2: Message boxes showing the initial default values for properties after a connection to the Access Northwind database as well as a change in value for the State property
Figure 8-3: Contrast this After Open message box for a connection to a SQL Server database with the After Open message box for an Access database shown in Figure 8-2.
Figure 8-4: The text boxes facilitate the specification of values by users for data access, and the click event procedures for the buttons implement dynamic data access with the values in the text boxes.
Figure 8-5: A form demonstrating dynamic data access from an Access database with a Windows form in a Visual Basic .NET project
Figure 8-6: Clicking the Validate Before Exec button ( Button2 ) reminds you to designate a valid CategoryID value instead of returning a count of the products in a nonexistent category, which happens when you click the top button on the form.
Figure 8-7: Using parameters for an OleDbCommand object, your Visual Basic .NET applications can pass values to an Access parameter query.
Figure 8-8: The click event procedure for Button1 in Form4 of the ADONETSamples project adds a new db1.mdb file to the bin subdirectory of the project folder.
Figure 8-9: Transactions can lead to dynamic data manipulation because their action queries can be rolled back if all actions do not succeed.
Figure 8-10: The click event procedures for the buttons and the form load event procedure demonstrate coding techniques for data manipulation via data adapters and datasets.
Figure 8-11: You can display metadata about the DataTable objects in a dataset.
Figure 8-12: You can let users page through the rows of a DataTable object in a dataset with a message box.
Figure 8-13: With the Update method, you can propagate a new row in a local DataTable object to its corresponding data source in an Access database.
Figure 8-14: Dragging a table to the Dataset Designer window creates a dataset schema that you can use as the basis for a typed dataset that appears in the tray below a form.
Figure 8-15: The graphically created Dataset11 object in the tray below Form5 points at the Dataset1.xsd schema created graphically in the Dataset Designer window appearing in Figure 8-14.

Chapter 9: ADO.NET: Datasets and Data Manipulation on Windows Forms

Figure 9-1: A Design view of the schema for the Order Details DataTable object in the DataSet1 dataset of the DatasetForms project
Figure 9-2: The Add Dataset dialog box lets you create a variable pointing at a dataset schema.
Figure 9-3: The initial schema for the DataSet11 dataset in Form1 of the DatasetForms project
Figure 9-4: The initial schema for the das1 dataset in Form1 of the DatasetForms project
Figure 9-5: A schema without a primary key for the das1 dataset generated by the code behind Form1 of the DatasetForms project
Figure 9-6: A schema with a primary key for the das1 dataset generated by the code behind Form1 of the DatasetForms project
Figure 9-7: A message box from the Button4_Click procedure in Form1 that displays information about two DataTable objects in the same dataset
Figure 9-8: Design view and an initial operational view of a form to compute total extended price for a range of orders
Figure 9-9: A message box showing total extended price for a range of orders based on a parent-child relationship
Figure 9-10: Adding multiple tables to a dataset with the Dataset Designer
Figure 9-11: If you specify a foreign key constraint by dragging a column from the child DataTable to a parent DataTable , the Edit Relation dialog box might look like this.
Figure 9-12: To create a typed dataset, you can reference a DataSet in the current project.
Figure 9-13: Design and operational views of a Windows form for data browsing and manipulation
Figure 9-14: A Windows form in a Visual Basic .NET application can enable browsing and manipulating of data in an Access database.

Chapter 10: Programming ASP.NET Pages

Figure 10-1: The default Web form that appears when you create an ASP.NET Web application
Figure 10-2: Start a new ASP.NET Web application project with the ASP.NET Web Application template.
Figure 10-3: You can use the Properties window to fine-tune the behavior of controls on Web pages as you get used to the programmatic interface.
Figure 10-4: The built-in browser makes it easy to verify the operation of ASP.NET Web applications in Visual Studio .NET.
Figure 10-5: Clicking the Refresh button in the browser for an ASP.NET Web application will often bring up this dialog box.
Figure 10-6: The highlighted button shows the new control added to the previous application sample.
Figure 10-7: Four windows from the Hello and Refresh sample
Figure 10-8: A flowchart indicating the logic for the sample demonstrating the use of Session variables
Figure 10-9: A basic custom login page for an ASP.NET Web application
Figure 10-10: A basic menu page implemented with hyperlinks but with ASP.NET code behind it
Figure 10-11: A pair of informational pages in the login sample application

Chapter 11: Implementing ADO.NET on ASP.NET Pages

Figure 11-1: The Design view of a Web page automatically created with a few clicks in the Data Form Wizard
Figure 11-2: The VBDotNetShippers table from the Northwind database showing in the Web page from Figure 11-1
Figure 11-3: A Web page enabling programmatic control over the formatting of a DataGrid control in the Page_Load and click event procedures for three buttons
Figure 11-4: Two operational views with different settings for the DataGrid controls Width property
Figure 11-5: A pair of windows with contrasting background and foreground colors for a DataGrid control
Figure 11-6: A result set on a Web page based on partial inputs for the country and city arguments
Figure 11-7: The Design view for a Web page enabling lookups based on user inputs to either text box
Figure 11-8: The impact of clicking the Insert button
Figure 11-9: The impact of clicking the Update button
Figure 11-10: The impact of clicking the Delete button
Figure 11-11: A Design view of a Web page for inserts , updates, and deletes

Chapter 12: Programming XML Web Services

Figure 12-1: The Add Web Reference dialog box exposing the tModel for a Web service that resolves zip codes
Figure 12-2: Design and operational views of a Web application client for the ZipCodeResolver Web service
Figure 12-3: Design and operational views of a Windows application client for the ZipCodeResolver Web service
Figure 12-4: The built-in testing dialog box for the DaysTilEOM Web method in the DaysTilEOM Web service
Figure 12-5: A return value window from the DaysTilEOM Web method for the test values shown in Figure 12-4
Figure 12-6: Design and operational view of a Windows client for the DaysTilEOM Web service
Figure 12-7: Design and operational view of an intranet-based Web client for the DaysTilEOM Web service
Figure 12-8: An operational view of an Internet-based Web client for the DaysTilEOM Web service
Figure 12-9: The initial Test page for the OrderIDService Web service
Figures 12-10: The input and response windows for the Freight Web method
Figures 12-11: The input and response windows for the TotalPrice Web method
Figure 12-12: An excerpt from the response window for the Items Web method with a OrderID value of 10248
Figure 12-13: Design and operational views of the client application for the OrderIDService Web service

Chapter 13: Securing .NET Applications with Access Databases

Figure 13-1: The confirmation dialog box for setting up the sample workgroup information file (.mdw)
Figure 13-2: Setup settings for the MyAdmin user account
Figure 13-3: Permission settings for the ReadOnlyUser account with the Categories table
Figure 13-4: The selection sample application in action, with an account that can read from the Categories table
Figure 13-5: The selection sample application in action, with an account that cannot read from the Categories table
Figure 13-6: The operation of the second user-level security sample, with a valid account for updating the Access database
Figure 13-7: The operation of the second user-level security sample, with an invalid account for updating the Access database
Figure 13-8: The edited Web.config file for the SecurePhoneList Web application project
Figure 13-9: The Login.aspx page design for the SecurePhoneList Web application project
Figure 13-10: The Login.aspx operational page for the SecurePhoneList Web application project that the Phones.aspx page transfers control to
Figure 13-11: The Phones.aspx page for the SecurePhoneList Web application after a user authenticates herself

Appendix: XML for Visual Studio .NET Access Developers

Figure A-1: XML view of an attribute-centric XML document with values based on the Shippers table
Figure A-2: Dataset view of the XMLFile1.xsd schema before any editing
Figure A-3: XML view of the XMLFile1.xml document, with a reference to the XMLFile1.xsd schema, after making an edit to generate an error
Figure A-4: A message box showing the contents of a previously saved XML document
Figure A-5: A message box showing the contents of a dataset populated from an XML document (XMLFile1.xml)
Figure A-6: The Generate Dataset dialog box for adding the Orders table as a data source to the dsCustomersOrders dataset in the XMLSamples project
Figure A-7: The Edit Relation dialog box for designating a parent-child relation between the Customers and Orders elements in the dsCustomersOrders typed dataset
Figure A-8: A message box based on a graphically defined relation that shows the order history for a customer whose CustomerID is ALFKI
 


Programming Microsoft Visual Basic. NET for Microsoft Access Databases
Programming Microsoft Visual Basic .NET for Microsoft Access Databases (Pro Developer)
ISBN: 0735618194
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Rick Dobson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net