Advanced Programming Using Visual Basic 2008 4th Edition Julia Case Bradley all chapter instant download
Advanced Programming Using Visual Basic 2008 4th Edition Julia Case Bradley all chapter instant download
https://ebookfinal.com/download/clearly-visual-basic-programming-with-
microsoft-visual-basic-2010-2nd-edition-diane-zak/
ebookfinal.com
https://ebookfinal.com/download/simply-visual-basic-2008-with-dvd-
rom-3rd-ed-edition-deitel/
ebookfinal.com
https://ebookfinal.com/download/process-engineering-and-design-using-
visual-basic-second-edition-datta/
ebookfinal.com
https://ebookfinal.com/download/advanced-graphics-programming-using-
opengl-1st-edition-tom-mcreynolds/
ebookfinal.com
Practical Database Programming with Visual Basic NET 1st
Edition Ying Bai
https://ebookfinal.com/download/practical-database-programming-with-
visual-basic-net-1st-edition-ying-bai/
ebookfinal.com
https://ebookfinal.com/download/practical-database-programming-with-
visual-basic-net-2nd-edition-ying-bai/
ebookfinal.com
https://ebookfinal.com/download/numerical-simulations-and-case-
studies-using-visual-c-net-1st-edition-shaharuddin-salleh/
ebookfinal.com
https://ebookfinal.com/download/microsoft-visual-basic-net-
programming-for-the-absolute-beginner-1st-edition-jonathan-s-harbour/
ebookfinal.com
https://ebookfinal.com/download/microsoft-visual-basic-game-
programming-for-teens-2nd-edition-jonathan-s-jonathan-s-harbour-
harbour/
ebookfinal.com
Advanced Programming Using Visual Basic 2008 4th
Edition Julia Case Bradley Digital Instant Download
Author(s): Julia Case Bradley, Anita Millspaugh
ISBN(s): 9780073517223, 0073517224
Edition: 4
File Details: PDF, 18.42 MB
Year: 2009
Language: english
Computer and Information Technology
Bradley−Millspaugh
McGraw-Hill
=>?
McGraw−Hill Primis
ISBN−10: 0−39−012228−9
ISBN−13: 978−0−39−012228−5
Text:
http://www.primisonline.com
Copyright ©2009 by The McGraw−Hill Companies, Inc. All rights
reserved. Printed in the United States of America. Except as
permitted under the United States Copyright Act of 1976, no part
of this publication may be reproduced or distributed in any form
or by any means, or stored in a database or retrieval system,
without prior written permission of the publisher.
Contents
Front Matter 1
Preface 1
To the Student 9
6. Services 259
Text 259
iii
9. Reports 413
Text 413
iv
Bradley−Millspaugh: Front Matter Preface © The McGraw−Hill 1
Advanced Programming Companies, 2010
Using Visual Basic 2008
PREFACE
Visual Basic (VB) has become the most popular programming language for
several reasons. VB is easy to learn, which makes it an excellent tool for un-
derstanding programming concepts. In addition, it has evolved into such a
powerful and popular product that skilled Visual Basic programmers are in
demand in the job market.
Visual Basic 2008, the latest version of VB, has many new features, espe-
cially in queries and Web application development. Visual Basic is designed
to allow the programmer to develop applications that run under Windows
and/or in a Web browser without the complexity generally associated with
programming.
This edition of the text is updated to Visual Studio 2008, .NET 3.5, and
ASP.NET 3.5. The screen captures are based on Windows Vista, but all pro-
grams can be run in Windows XP, although the special effects of WPF cannot
be seen in XP.
Approach
Chapter topics are presented in a sequence that allows the programmer to learn
how to deal with a visual interface while acquiring important programming
skills such as accessing and updating data in a relational database, developing
applications for the Web and for mobile devices, and adding browser-based
Help files to an application.
The chapters may be used in various sequences to accommodate the needs
of the course, as well as a shorter quarter system or a semester-long course.
Pub ID: Pub_idTextBox 7. Retrieve and display an array of child rows for a selected parent row.
Hire Date: Hire_dateTextBox
8. Create an application that displays data from a many-to-many relationship.
9. Select the correct locations for handling and formatting data in a multitier application.
Plan the Objects, Properties, and Methods Plan the two tiers. Determine the
objects and property settings for the form and its controls and for the data-tier
component. Figure 3.31 shows a diagram of the components in the two tiers.
Presentation Tier
EmployeeForm Name
Text
EmployeeForm
Employees Learning Objectives
FullNameComboBox Name FullNameComboBox
Text boxes for all database
fields (including Hire Date)
Specific objectives tell students what
will be covered in the chapter and
what they will be able to do after
completing the chapter.
TIP
➤ Feedback 4.2 If the drop-down arrows do not
1. What Fill method statements are created for a relationship for appear in the Data Sources window,
Customers and Orders? Assume that the project contains two make sure that you have a form
TableAdapters called CustomersTableAdapter and OrdersTableAdapter displaying in the designer. ■
as well as a DataSet called NorthwindDataSet.
2. How can you view the relationship between two tables?
3. Describe the necessary steps to display the job description from the
jobs table rather than the job id when displaying the employee table.
TIPs
Feedback Questions Tips, found in the margins throughout
the text, help students avoid potential
Feedback questions encourage students to reflect on trouble spots in their programs and
the topics covered and evaluate their understanding of encourage them to develop good
details relating to that topic. programming habits.
Bradley−Millspaugh: Front Matter Preface © The McGraw−Hill 3
Advanced Programming Companies, 2010
Using Visual Basic 2008
Case Studies files have the same name, you are prompted to select the file to keep. A check
box allows you to show the deleted files since the last copy operation.
See “How to: Copy Web Site Files with the Copy Web Site Tool” in MSDN for
steps to copy all files at once, copy files individually, or synchronize files.
Claytor’s Cottages
Modify your Claytor’s Cottages case study project to the room has a Jacuzzi, Private access, and/or Fire-
Publishing a Web Site
display the room information. The Room form should place. Display the Bed type and the room rates from
display for the Edit / Rooms menu item. the Beds table. The Publish Web Site utility precompiles the Web pages and code content. The
On the Room form, include a combo box that Hint: You can bind the checked property of a compilation process removes the source code from the files and leaves only
holds the room name. Use check boxes to indicate if check box to a Boolean data field. stub files and compiled assemblies for the pages. You can specify the output
location as either a directory or a server location.
Precompiling the Web pages offers a couple of advantages over just copy-
ing the pages. One advantage is response speed. When pages are just copied to
Christian’s Car Rentals
a site, they must compile when a request is made for the page. Not having the
Modify your case study application to display the price and mileage rate in text boxes. The related mod- source code on the site also provides some security. During the publish pro-
vehicle information. Display a combo box that contains els and manufacturer should display in a grid. cess, you have the option of having markup protection, which does not allow for
the car sizes. When the user selects a size, display the later updates to the pages. If you opt to not have the files updatable, the code
in single-file pages is deployed as source code rather than being compiled into
an assembly.
vi P R E F A C E
Many topics from the introductory course are presented in greater detail
and demand more from the students. Many other advanced topics are pre-
sented, including displaying and updating relational databases, WCF Services,
data structures, user controls, Help files, and mobile application development
for Windows devices, along with expanded coverage of cascading style sheets
and AJAX for Web development.
This edition now includes coverage of the many new features in Visual
Studio including LINQ, WPF, and WCF. Both LINQ and WPF have been
placed in Chapter 13, the “Additional Topics” chapter, allowing you to cover
them at any point in the course.
The layout for Web pages uses the preferred method of incorporating <div>
for sections and all formatting with styles. Tables are only used within a <div>.
P R E F A C E vii
Chapter Organization
Each chapter begins with identifiable objectives and a brief overview. Numer-
ous coding examples as well as hands-on projects with guidance for the coding
appear throughout. Thought-provoking feedback questions give students time
to reflect on the current topic and to evaluate their understanding of the de-
tails. The end-of-chapter items include key terms, a chapter review, questions,
programming exercises, and two case studies. The case studies provide a
continuing-theme exercise that may be used throughout the course. The
in-chapter programs are included on the student Web site, allowing the student
to test and modify existing code. Of course, it is also important to develop a
complete application from scratch to really learn the programming techniques.
Chapter 1, “Visual Studio and the .NET Framework,” discusses the
features of the Visual Studio IDE and the .NET Framework. Applications
demonstrate how to display data from the AssemblyInfo.vb file using the
My object. MDI projects, toolbars, and status bars are reviewed.
Chapter 2, “Building Multitier Programs with Classes,” reviews
object-oriented terminology, creating classes, and instantiating objects.
Creating and throwing exceptions from the business services tier is
introduced. The ErrorProvider and TryParse are demonstrated to
improve the efficiency of validation in the presentation tier.
Chapter 3, “Windows Database Applications,” explains the
relationship of datasets, tables, rows, and constraints. Database
applications use SQL Server databases to display information in grids,
combo boxes, labels, and the database display controls.
6 Bradley−Millspaugh: Front Matter Preface © The McGraw−Hill
Advanced Programming Companies, 2010
Using Visual Basic 2008
viii P R E F A C E
P R E F A C E ix
Acknowledgments
We would like to express our appreciation to the many people who have con-
tributed to the successful completion of this text. Most especially, we thank the
students at Mt. San Antonio College who helped class-test the material and
who greatly influenced the manuscript.
Many people have worked very hard to design and produce this text.
We would like to thank our editors Liz Haefele, Scott Davidson, and Alaina
Grayson. Our thanks also to the many people who produced this text including
Marlena Pechan, and Betsy Blumenthal.
We greatly appreciate John Blyzka, Peter van der Goes, and Robert Price
for their thorough technical reviews, constructive criticism, and many valuable
suggestions. And most importantly, we are grateful to Dennis and Richard for
their support and understanding through the long days and busy phone lines.
8 Notes
Bradley−Millspaugh: Front Matter To the Student © The McGraw−Hill 9
Advanced Programming Companies, 2010
Using Visual Basic 2008
TO THE STUDENT
Welcome to the exciting new features of Visual Basic 2008. You have probably
already learned that the best way to learn how to program is to actually sit at
a computer and write code, change things, and test it again. Stepping through
existing code is also a great tool in learning new techniques. With that in mind,
we have included all of the code from the examples within the chapters on your
student text Web site. Please feel free to load the programs, change things, and
test it again.
But . . . if you really want to learn how it works, it is critical that you create
a blank project and try the techniques yourself. If you run into a problem, take
a look at the sample and compare properties and code.
There are several tools in this text to help you on your way.
• Each chapter begins with a list of topics and ends with a summary. Com-
bine these for a thumbnail review of the chapter. Understanding the ter-
minology is an important part of learning any new language, which is also
true with programming languages.
• A list of key terms is at the end of each chapter. Each of those terms is in
boldface within the chapter. There is also a glossary at the end of the text
where you can look up the definition of the terms.
• Test yourself with the Feedback questions as you work through each sec-
tion of a chapter. The review questions at the end of the chapter can test
your understanding of the topics.
• Tips are included to give suggestions in situations where you may run into
problems caused by the version of software installed/not installed or with
settings.
• Make sure to check out the appendixes, which hold a wealth of support
material.
J.C.B.
A.C.M.
xi
10 Notes
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 11
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
Try
With StoresBindingSource
C H .EndEdit()
A P T E R
.AddNew()
1 End With
AddingBoolean = True
SetComboBoxBinding()
Stor_nameComboBox.Focus()
SetControlsReadOnly(False)
PreviousSelectedIndex = 0
End If
at the completion of this chapter, you will be able to . . .
1. Distinguish the features of the Visual Studio IDE and the .NET Framework.
2. Identify and understand the purpose of each of the files listed in the Solution Explorer.
5. Create an MDI project with a parent form, child forms, a toolbar, status bar, context menus,
and ToolTips.
6. Use the singleton design pattern to create a class that should be instantiated only once.
12 Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 3
System.IO Types for reading and writing data streams and files.
The classes in the library comply with published standards known as the
Common Language Specification (CLS). The CLS specifies how a lan-
guage that interacts with the CLR should behave. If you want a program to in-
teract with programs and components written in other languages, you should
make sure that it is CLS compliant. The rules for CLS compliance can be found
in the .NET Framework Developer’s Guide under the heading “Writing CLS-
Compliant Code.” Note that all VB programs that you write using the VS IDE
will be CLS compliant automatically.
Types
The .NET documentation uses the general term types to refer to the classes,
structures, enumerations, delegates, interfaces, and data types in the library, as
well as any that you define. You can think of a type as any element that you can
use in the As clause of a declaration:
treat the variables when you assign one variable to another. For example, if you
assign one integer variable to another, you have two memory locations with the
same value:
SecondValueInteger = FirstValueInteger
However, if you assign one reference type to another, you have two variables
that point to the same object in memory:
SecondForm = FirstForm ' Assign reference for first form to second form.
Any changes that you make to either variable are made to the one object in
memory to which both variables refer. In some previous versions of VB, refer-
ence types were called object variables. However, VB reference types include
more types than the more restrictive object variables.
Can you predict the debug output from the two groups of statements above?
Follow the logic and write down your answer; then look back here to check
your understanding.
FirstValueInteger = 5; SecondValueInteger = 10
FirstForm = New Caption for First Form; SecondForm = New Caption for First Form
All numeric data types are value types. Reference types include class types,
arrays (even if the individual elements are numeric), and strings. A value type
always holds a value; when you declare a new variable of a value type, the vari-
able is always initialized, either to a value that you supply or to the default value.
A reference type may or may not hold a value; you can use the IsNot Nothing
condition to determine whether the variable refers to an instance of an object.
C H A P T E R 1 5
Assemblies
An assembly is a basic unit of code that may be a single PE file or multiple
files. Each of your applications will be contained in a single assembly, which
is the smallest deployable piece of code. An assembly has an assembly man-
ifest that contains metadata about the version, a table describing all of the
files needed by the assembly, and an “assembly reference list” that specifies
all of the external files needed, such as DLLs created by someone else. An
assembly is similar to an .exe or a .dll file written in earlier versions of Visual
Basic—it contains all of the necessary information to run the application or
component.
Recall that the .NET Framework class library is not one big file but
rather a collection of files. The classes are stored in many files with the ex-
tension .dll and referred to as DLLs (for dynamic link libraries). Each of the
DLLs in the class library is one assembly. As your program begins execu-
tion, only the needed assemblies are loaded into memory. When you want to
use a type that is not already referenced, you must add a reference to the
DLL (assembly).
Attributes
Attributes are tags containing information about parts of a program such as
types or methods. The system defines many attributes of your assembly, such
as the name, version, culture, and security. The attributes are part of the meta-
data in a .NET assembly. The process of examining the metadata in an assem-
bly’s attributes is called reflection.
Later in this chapter, you will learn to retrieve and use the custom attri-
butes in a project’s assembly information, which is stored in the Assembly-
Info.vb file.
ASP.NET
Another big part of the .NET world is the improvement in Web development.
ASP.NET 3.5 is the newest version of Active Server Pages (ASP). It is a Web
development environment that can compile applications written in any .NET-
compatible language including Visual Basic. This means that the benefits of the
common language runtime and managed code are available for developing Web
applications. ASP.NET makes Web development easier by providing the same
debugging support for Web Forms and Web Services as for Windows applications.
You will begin working with ASP.NET in Chapter 7. Chapters 8 and 9
cover accessing databases from ASP.NET, which is a common technique for
displaying data on a Web site.
➤ Feedback 1.1
1. What is meant by the term .NET Framework?
2. What are the meaning and function of each of these terms?
a. CLR
b. CLS
c. MSIL
d. PE
3. What is the difference between a reference type and a value type? Why
is it important to know the difference?
Visual Studio
Although you could write your programs in any editor and then use the VB com-
piler to compile them, Visual Studio provides an environment to make your devel-
opment task easier. You should already be familiar with the various windows in the
environment as well as the basic debugging capabilities. For a review of the VS
IDE, as well as tips and shortcuts, see Appendix D. This section introduces you to
more details about the parts of a project and changes to the VS environment.
Note: This chapter introduces writing Windows applications. You also have
the option of writing Windows Presentation Foundation (WPF) applications.
Although WPF applications are introduced in Chapter 13, you might prefer to
begin there and write all of your programs using WPF.
Temporary Projects
You can create temporary projects for testing, without saving them. This can be
both good and bad: You don’t have to clutter your drive with small projects that
you create just to test something, but you may forget to save a project that you
wanted to keep.
When you create a new project, by default it is a temporary project, which
VS stores in a temporary folder on the hard drive. So even when you compile
and run the project, the compiler saves the files in the temporary folder. When
you exit VS or choose to begin another project, you are presented with the
option to save or discard the project (Figure 1.2).
If you want to always save new projects, you can select that option in the
Options dialog box. Choose Tools / Options / Projects and Solutions and select
Save new projects when created.
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 17
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 7
Figure 1.2
bin\Debug folder
obj folder
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 19
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 9
hidden files and folders. The My Project folder holds several files for project
configuration, including AssemblyInfo.vb. You will learn to view and set con-
figuration options in the Project Designer, which is discussed in the “The
Project Designer” section later in this chapter.
In Figure 1.4, you can see the expanded References collection, the bin and
obj folders, and the form files for Form1.vb. You can expand each of the nodes
to see more details. Note that the solution name does not display by default. To
show the solution name, as in Figure 1.4, select Tools / Options / Projects and
Solutions and check Always show solution. You will want to always show solu-
tions so that you can edit solution names.
References
In the References folder, you can see a list of System libraries (DLLs), such as
System, System.Deployment, System.Drawing, and System.Windows.Forms.
These are the references included by default for a new Windows application.
You can add a reference by right-clicking on the References folder and select-
ing Add Reference from the context menu. You also can add references in the
Project Designer, which is discussed a little later. You may need to add a refer-
ence if you want to refer to objects in another assembly or components written
in a different language.
The executable
Debugging information
20 Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
The project’s .exe file is the executable, which is used to run the program; the
.pdb file holds debugging information. If you are distributing your application,
you only need to distribute the .exe file, not the .pdb file. The ProjectName.
vshost.exe file is a small application that runs the project in the environment.
Project Resources
The Resources folder holds resources that you add to your project. Figure 1.6
shows a graphic file stored in the Resources folder; you can also add sound
files and text strings to the resources.
Figure 1.6
Visual Studio provides several ways to add resources to the folder and to
access those resources. You can add resources in the Project Designer, dis-
cussed later in this chapter. You also can add resources from the Properties
window, such as when you set the Image property of a PictureBox control. At
design time, you can assign properties of controls to resources that are in the
Resources folder, and you can retrieve resources at run time using the My.Re-
sources object, which also is discussed later in this chapter.
Each form in your project also has a resource file, which has a .resx exten-
sion. For example, Form1.vb has a Form1.resx file, which you can see in the
Solution Explorer when you click on the Show All Files button and expand the
form’s node.
The .resx file is mostly text in XML format, which you can open and view
in the IDE. The .resx file holds pointers to the files in your Resources folder
and supplies the resources to the form at compile time. Any graphic elements
that you add to the form, such as a PictureBox’s Image property or a form’s
Icon property, also are stored in the .resx file in text that represents the binary
graphic file.
If you rename your form file in the Solution Explorer, the .resx file is auto-
matically renamed to match. At times you may find extra .resx files in the
project’s folder; you can safely delete any extra .resx files if their names do not
match any forms in the project.
Image Files in Visual Studio 2008 Microsoft is including many graphic files
with Visual Studio 2008. The graphics are those used in Windows so that you
can make your applications use the standard images. The default location for
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 21
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 11
Partial Classes
Partial classes, also called partial types, is a feature that was added in the
2005 version of Visual Studio. In its simplest form, partial classes allow you to
split a class into two or more separate files.
Programmer-written VB code
Designer-generated VB code
Resource file for the form
The file that holds the designer-generated code includes the class inheri-
tance information:
The partial class instantiates the form and the visual components for the
form as well as stores property settings.
The form’s class file that holds the programmer-written code begins with
this line:
The compiler uses the statements in both files to create the compiled class.
Note that you can create multiple partial class files and one single file without
the “Partial” designation.
22 Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
Display the Project Designer by double-clicking on the My Project folder in the Solution Explorer.
Assembly
information
The Application Tab The Application tab is the default tab that appears on top
when you open the Project Designer. On the Application tab, you can set the ap-
plication type, the startup form, the icon, and the splash screen. You also can
display and set the application’s assembly information from this dialog. Later
in this chapter, we will use many of these options.
The Compile Tab On the Compile tab, you can set the path for the compiler
output. You also can alter the settings for Option Explicit and Option Strict
and specify which errors should be flagged by the compiler and which should
be ignored.
The References Tab The References tab displays the names and paths for the
project references. You can add and remove references to Windows or Web
library components, as well as external components, in this dialog.
The Resources Tab The Resources tab allows you to easily add and remove the
graphic files that you use for picture boxes and toolbars, any sound files, and
text strings in various languages to use for localization.
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 23
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 13
The Signing, Security, and Publish Tabs The settings on the Signing, Security,
and Publish tabs are used for ClickOnce deployment. Using ClickOnce deploy-
ment, you can set up applications to be deployed and updated on multiple sites
via the Web. This technique is primarily used by large organizations to facili-
tate deploying applications to many users.
The VB My Objects
The Visual Basic My object provides several objects and properties. My gives
you easy access to information about your application and its resources, the
computer on which the application is executing, and the current user.
It is easy to discover the available objects using IntelliSense (Figure 1.9):
Application, Computer, Forms, Resources, Settings, User, and Web Services.
Figure 1.9
You can retrieve information about the user’s computer, operating system,
and amount of memory with My.Computer.Info (Figure 1.10).
If you want to know the name of the user, you can use
UserNameString = My.User.Name
In the following section, you will use My.Application to retrieve the assem-
bly information about an application.
Figure 1.10
Use My.Computer.Info to
retrieve information about
the user’s computer.
Figure 1.11
C H A P T E R 1 15
Figure 1.12
Type appropriate entries for your applications. Figure 1.12 shows the as-
sembly information for the chapter hands-on example program.
Another way to modify a project’s assembly information is to edit the
AssemblyInfo.vb file directly. You can see the file in the Solution Explorer
beneath the My Project folder when Show All Files is selected (Figure 1.13).
Double-click the filename to display the file in the editor.
Figure 1.13
You can modify the assembly information by editing the AssemblyInfo.vb file.
26 Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
TitleLabel.Text = My.Application.Info.Title
C H A P T E R 1 17
Write the code to assign values to the labels in the Form_Load event
procedure. The code uses the My.Application.Info object to retrieve the
attributes.
With My.Application.Info
NameLabel.Text = .AssemblyName
TitleLabel.Text = .Title
DescriptionLabel.Text = .Description
CompanyLabel.Text = .CompanyName
ProductLabel.Text = .ProductName
VersionLabel.Text = "Version: " & .Version.ToString
CopyrightLabel.Text = .Copyright
End With
End Sub
Figure 1.15
➤ Feedback 1.2
Write the statements necessary to retrieve and display the copyright attribute
in CopyrightLabel.
The MenuStrip,
ContextMenuStrip, ToolStrip,
and StatusStrip components
are grouped together in the
Menus & Toolbars section of
the toolbox.
C H A P T E R 1 19
You can use the MenuStrip’s smart tag (Figure 1.20) to set some properties of
the menu bar. Select Edit Items to open the Items Collection Editor (Figure 1.21),
where you can set properties of the menu items, and add, remove, and rearrange
the items.
When you use the visual menu designer to create menus and menu items,
each item is automatically given a meaningful name. But if you add a menu
item in the Items Collection Editor, you must name the item yourself.
Figure 1.20
TIP
The keyboard shortcut for opening
a smart tag when its arrow appears
is Alt + Shift + F10. ■
Figure 1.21
In the Items Collection Editor, you can add and remove menu items, reorder items, and set properties of the items.
You can edit any of the items by selecting it in the Members list. Figure 1.22
shows the FileToolStripMenuItem selected. Notice that the top right now indicates
the selected item and that one of the properties of the FileToolStripMenuItem is a
DropDownItems collection. If you select that collection, the Items Collection
Figure 1.22
Edit the properties of the individual menu items in the Items Collection Editor. Notice that the FileToolStripMenuItem has a
DropDownItems property, which is a collection of the menu items that appear below the File menu.
FileToolStripMenuItem is selected
C H A P T E R 1 21
Editor displays the items beneath the File menu. Also notice in Figure 1.22 that
the right side of the Items Collection Editor is similar to the Properties window in
the IDE. You can click on the buttons to display the properties in alphabetic order
or categorized view.
Figure 1.23
The ContextMenuStrip component appears in the component tray. When it is selected, the visual menu designer appears to
allow you to enter menu items.
A context menu does not include a top-level menu name; instead each of the
items belongs to the Items collection of the ContextMenuStrip. Notice that the
smart tag arrow appears on the component in the component tray, rather than on
the menu in the designer. You can select Edit Items from the smart tag or select
the Items property in the Properties window to edit the individual menu items.
The form and each of the controls that you add to the form has a Context-
MenuStrip property. You assign the context menu to the form or control by se-
lecting its name in the Properties window. Note that you can add multiple
context menus to the component tray and assign each to a different control.
If you assign a context menu to a form, it becomes the default context menu
for the form and most controls on the form. However, controls that allow text
entry, such as text boxes and combo boxes, have a default context menu that
contains the editing items Cut, Copy, and Paste. If you assign your own context
menu to a text control, you will lose the items on the default context menu.
You can easily assign a single event handler to both a menu item and a
context menu item. Add the second item to the Handles clause of the event
handler. In the following example, the event handler is executed for the Click
32 Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
event of both the menu item and context menu item. Note that the menu
designer named the context menu item with the same name as the menu item,
with the addition of the numeral “1”.
Me.Close()
End Sub
Figure 1.24
The ToolStrip component appears in the component tray. You can drop down the list for the types of buttons and controls that
you can add to the ToolStrip.
After you add the buttons to the ToolStrip container, you can set the prop-
erties of each button in the Properties window or in the Items Collection Editor, TIP
which you display from the smart tag. You will need to give the toolbar buttons Set the ToolTipText property of each
meaningful names; the visual designer assigns names like ToolStripButton1. toolbar button to aid the user, in
Your buttons can hold an image, text, or both. Generally you will want to case the meaning of each graphic is
place an image on the button and set the ToolTip text to indicate the purpose of not perfectly clear. ■
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 33
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 23
Figure 1.25
Set the Name, Image, and ToolTipText properties for each ToolStripButton.
ToolTip
Name
DateToolStripStatusLabel.Text = Today.ToShortDateString
TimeToolStripStatusLabel.Text = Now.ToLongTimeString
End Sub
34 Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
Figure 1.26
DateToolStripStatusLabel.Text = Today.ToShortDateString
TimeToolStripStatusLabel.Text = Now.ToLongTimeString
End Sub
Bradley−Millspaugh: 1. Visual Studio and the Text © The McGraw−Hill 35
Advanced Programming .NET Framework Companies, 2010
Using Visual Basic 2008
C H A P T E R 1 25
➤ Feedback 1.3
What steps are necessary to display the current time in a StatusStrip label
called CurrentTimeStatusStripLabel?
MDI Applications
In this section, you will create a multiple document application with parent
and child forms, a menu bar, context menus, a toolbar, and a status bar.
With MDI, a parent and child relationship exists between the main form
and the child forms. One of the rules for MDI is that if a parent form closes, all
of its children leave with it—a pretty good rule. Another rule is that children
cannot wander out of the parent’s area; the child form always appears inside
the parent’s area.
VB allows you to have forms that act independently from each other. You
may have a parent form and several child forms and some forms that operate
independently. For example, a splash form likely should remain SDI.
One feature of MDI is that you can have several child windows open at the
same time. The menu bar generally contains a Window menu that allows you to
display a list of open windows and move from one active window to another.
Exploring the Variety of Random
Documents with Different Content
include a great deal of incident and show, to be supported by
occasional instrumental music, and to have a comic personage or
buffoon amongst its characters. The tenth chapter of M. Magnin’s
fifth and final section shows us a strange variety in the subjects
selected for these plays—in which, it is to be noted, each puppet had
its own separate speaker behind the scenes. Weltheim, the manager
of a company of marionettes in the last twenty years of the 17th
century, and the beginning of the 18th, usually recruited interpreters
for his puppets amongst the students of Leipzig and Jena. He was the
first who performed a translation of Molière’s comedies in Germany.
In 1688, we find him giving at Hamburg, a piece founded on the fall
of Adam and Eve, followed by a buffoonery called Jack-pudding in
Punch’s Shop. Then we come to such pieces as The Lapidation of
Naboth; Asphalides, King of Arabia; The Fall of Jerusalem, and The
Death of Wallenstein—a strange medley of ancient, modern, sacred
and profane history. The following performance, at which M.
Schütze, the historian of the Hamburg theatre, declares that he was
present in his youth, must have been as curious as any we have
named. “A little musical drama on the fall of Adam and Eve
(performed at Hamburg rather more than a century ago), the
characters in which, including that of the serpent, were filled by
puppets. The reptile was seen coiled round the tree, darting out his
pernicious tongue. After the fall of our first parents, Hanswurst
addressed them in a strain of coarse pleasantry that greatly diverted
the audience. Two bears danced a ballet, and at the end, an angel
appeared, as in Genesis, drew a sword of gilt paper, and cut at a
single blow the knot of the piece.” Later than this a tailor named
Reibehand, who kept a puppet theatre, contrived to burlesque the
touching parable of the Prodigal Son. His playbill ran thus: “The
arch-prodigal, chastised by the four elements, with Harlequin, the
joyous companion of a great criminal.” The merit of this most
irreverent Haupt-Action consisted in the transformations it
contained. Thus the fruit the young prodigal was about to eat
changed itself into death’s heads, the water he was about to drink,
into flames; rocks split open and revealed a gallows with a man
hanging from it. The limbs of this corpse swinging in the wind, fell
off one by one, then assembled upon the ground and reconnected
themselves, and then the dead man arose and pursued the prodigal.
A very German and not very pleasing device. When Charles XII. of
Sweden fell dead in the trenches at Friedrichshall, slain, according to
popular superstition, by an enchanted bullet, his death was
immediately taken advantage of by the indefatigable marionettes. A
great historical piece was brought out at Hamburg, in which
Friedrichshall was twice bombarded. In it a soldier excited great
admiration as a prodigy of mechanism, by lighting his pipe and
puffing smoke from his mouth. This feat was soon imported into
France, and may be seen at the present day executed in great
perfection at Seraphin’s theatre in the Palais Royal.
The triviality, absurdity, and profanity that tarnished the German
stage during the first half of the eighteenth century, were followed by
a reaction in favour of better taste and common sense. Gottsched and
Lessing gave the signal of the revival of art and poetry. The theatre
resumed its importance; actors their proper place, from which they
had been ousted by the intolerance of the consistories; puppets
returned to the modest sphere which circumstances had permitted
and encouraged them temporarily to quit, and resumed their old
stock pieces, consisting of Biblical dramas and popular legends.
Faust was exceedingly popular, and novelties were occasionally
introduced. Lewis’s Bravo of Venice was taken for the subject of a
grand drama, performed by the Augsburg marionettes, which also
played, with great success, a drama founded on the well-known story
of Don Juan and his marble guest. And this brings us to the time
when a boy, Wolfgang Goethe by name—kept at home by his parents
during certain gloomy episodes of the Seven Years’ War, when
Frankfort was occupied by the French—delighted his leisure with a
marionette theatre, a Christmas gift from his grandfather, and so
fostered his inborn dramatic taste and genius. In his memoirs, and in
Wilhelm Meister, he tells us, in some charming passages, what
pleasure he took in the management of his mimic comedians.
“We are indebted,” says M. Magnin, “for what follows, to a
confidential communication made by the illustrious composer
Haydn, at Vienna, in 1805, to M. Charles Bertuch, one of his fervent
admirers.” And he relates that when Hadyn was mâitre de chapelle
to Prince Nicholas-Joseph Esterhazy, that enlightened and generous
patron of art, and especially of music, he composed four little operas
for a marionette theatre, which existed in the Esterhazys’
magnificent Castle of Eisenstadt in Hungary. They were written
between 1773 and 1780. “In the list of all his musical works, which
the illustrious old man signed and gave to M. Charles Bertuch,
during the residence of the latter at Vienna, occur the following lines,
which I exactly transcribe:—Operette composed for the marionettes:
Philémon and Baucis, 1773; Geniêvre, 1777; Didon, parody, 1778; La
Vengeance accomplie ou la Maison Brulie (no date). In the same list
the Diable Boiteux is set down, probably because it was played by
Prince Esterhazy’s marionettes, but it was composed at Vienna, in
the author’s early youth, for Bernardone, the manager of a popular
theatre at the Corinthian Gate, and twenty-four sequins were paid for
it. It was thought that these curious operas, all unpublished, had
been destroyed in a fire which consumed a part of the Castle of
Eisenstadt, including Haydn’s apartment; but that was not the case,
for they were seen in 1827 in the musical library of the Esterhazys,
with a score of other pieces whose titles one would like to know.”
Goethe has told us, in an interesting passage of his memoirs, that
the idea of his great work of Faust was suggested to him by the
puppet-show. M. Magnin, who takes an affectionate interest in the
triumphs of the marionettes with whom he has so long associated,
and whose career he has traced from their cradle, exults in the claim
they have thus acquired to the world’s gratitude—not always, it must
be owned, shown to those who best deserve it. He concludes his
history with a double recapitulation—first, of the celebrated persons
who have taken pleasure in this class of dramatic performances; and,
secondly, of the most distinguished of those who have wielded pen in
its service. And he calls upon his readers to applaud, and upon the
ladies especially to wave kerchief and throw bouquet at the graceful
Fantasia, the pretty fairy, the sprightly muse of the marionettes. We
doubt not but that the appeal will be responded to; although her
fairyship may fairly be considered to be already sufficiently rewarded
by meeting with a biographer in every way so competent.
THE QUIET HEART.
PART V.—CHAPTER XXV.
But this Menie Laurie, rising up from her bed of unrest, when the
morning light breaks, cold and real, upon a changed world, has wept
out all her child’s tears, and is a woman once again. No one knows
yet a whisper of what has befallen her, not even poor Jenny, who
sobbed over her last night, and implored her not to weep.
Now, how to tell this—how to signify, in the fewest and calmest
words, the change that has come upon her. Sitting, with her cheek
leant on her hand, by the window where she heard it, before any
other eyes are awake, Menie ponders this in her heart. Always before
in little difficulties counsel and help have been within her reach; few
troublous things have been to do in Menie’s experience; and no one
ever dreamt that she should do them, when they chanced to come to
her mother’s door.
But now her mother’s honour is involved—she must not be
consulted—she must not know. With a proud flush Menie draws up
herself—herself who must work in this alone. Ah, sweet dependence,
dear humility of the old times! we must lay them by out of our heart,
to wait for a happier dawn. This day it is independence—self-support
—a strength that stands alone; and no one who has not felt such an
abrupt transition can know how hard it is to take these unused
weapons up.
“Will you let me speak to you, aunt?” Menie’s heart falters within
her, as she remembers poor Miss Annie’s unaccepted sympathy. Has
she indeed been driven to seek refuge here at last?
“My love! how can you ask such a question, darling, when I am
always ready to speak to you?” exclaimed Miss Annie, with
enthusiasm.
“But not here—out of doors, if you will permit me,” said Menie in a
half whisper. “I—I want to be out of my mother’s sight—she must not
know.”
“You delightful creature,” said Miss Annie, “are you going to give
me your confidence at last?”
Poor Menie, sadly dismayed, was very ill able to support this strain
of sympathy. She hastened out, not quite observing how it tasked her
companion to follow her—out to the same green overgrown corner,
where once before she had spoken of this same subject to Randall
himself. With a slight shudder she paused there before the little
rustic seat, from which she had risen at his approach; but Menie
knew that she must harden herself against the power of associations;
enough of real ill was before her.
“I want to tell you, aunt, if you will please to listen to me, that the
engagement of which you were told when we came here is dissolved
—broken. I do not know if there is any stronger word,” said Menie, a
bewildered look growing on her face. “I mean to say, that it is all
over, as if it had never been.”
And Menie folded her hands upon her breast, and stood patiently
to listen, expecting a burst of lamentation and condolence; but Menie
was not prepared for the laugh which rung shrilly on her ears—the
words that followed it.
“My sweet simple child, I have no doubt you quite believe it—
forgive me for laughing, darling; but I know what lovers’ quarrels
are. There, now, don’t look so grave and angry; my love, you will
make it all up to-morrow.”
And Miss Annie Laurie patted Menie’s shrinking shoulder
encouragingly. It was a harder task this than Menie had anticipated;
but she went on without flinching.
“This is no lovers’ quarrel, aunt; do not think so. My mother is in
some degree involved in this. I cannot consult her, or ask her to help
me; it is the first time I have ever been in such a strait;” and Menie’s
lip quivered as she spoke. “You are my only friend. I am serious—as
serious as mind can be, which feels that here it decides its life. Aunt,
I apply to you.”
Miss Annie Laurie looked up very much confused and shaken; very
seldom had any one spoken to her with such a sober seriousness of
tone; she could not think it unreal, for neither extravagance nor
despair were in these grave sad words of Menie. The poor frivolous
heart felt this voice ring into its depths, past all superficial
affectations and sentiments. No exuberance of sympathy, no shower
of condoling words or endearments, could answer this appeal; and
poor Miss Annie faltered before this claim of real service—faltered
and shrank into a very weak old woman, her self-delusions standing
her in no stead in such a strait; and the only answer she could make
was to cry, in a trembling and strangely altered voice, “Oh, child, do
not speak so. What can I do for you?”
Most true, what can you do, indeed, poor soul! whose greatest
object for all these years has been to shut out and darken the daylight
truth, which mocked your vain pretences? You could give charity and
gentle words—be thankful; your heart is alive in you because of
these: but what can you do in such a difficulty as this? where is your
wisdom to counsel, your strength to uphold? This grave girl stands
before you, sadly bearing her burden, without an effort to conceal
from you that she feels it hard to bear; but you, whose age is not
grave, whose heart has rejected experience, whose mind has refused
to learn the kindly insight of advancing years—shrink into yourself,
poor aged butterfly; feel that it is presumption to call yourself her
counsellor, and say again—again, with a tremble in your weakened
voice, “What can I do for you?”
“Aunt, I apply to you,” said Menie Laurie; “I ask your help, when I
resolve to decide my future life according to my own will and
conviction of what is best. I have no one else to assist me. I apply to
you.”
Miss Annie melted into a fit of feeble crying; her hands shook, her
ringlets drooped down lank about her cheeks. “I will do anything—
anything you like; tell me what to do, Menie—Menie, my dear child.”
It was pitiful to see her distress. Menie, whom no one comforted,
felt her heart moved to comfort her.
“I will not grieve you much,” said Menie gently; “only I beg you to
give me your countenance when I see Randall—Mr Home. I want you
to be as my mother might have been in other circumstances; but I
will not trouble you much, aunt—I will not trouble you.”
Miss Annie could not stop her tears; she was very timid and afraid,
sobbing helplessly. “What will I do? what can I do? Oh, Menie, love,
you will make it up to-morrow;” for poor Miss Annie knew no way of
conquering grief except by flying out of its sight.
Menie led her back to the house tenderly. Menie had never known
before this necessity of becoming comforter, when she had so much
need to be comforted. It was best for her—it gave her all the greater
command over her own heart.
And to hear poor innocent July, in her own young unclouded joy—
to hear her unsuspicious mother at their breakfast-table—to have
Randall’s name cross her now and then, like a sudden blow—
Randall, Randall;—Menie knew nothing of all these depths, nor how
such sorrows come in battalions; so, one by one, her inexperienced
heart gained acquaintance with them now,—gained acquaintance
with that sorest of human truths, that it is possible to love and to
condemn—possible to part, and know that parting is the best—yet
withal to cling and cling, and hold, with the saddest gripe of
tenderness, the heart from which you part. Poor Menie! they said she
looked very dark and heavy; that last night’s exertions had wearied
her—it was very true.
Miss Annie sent a message that she was not well, and would
breakfast in her own room. In the forenoon, when she came down
stairs again, even Menie was startled at the change. Miss Annie’s
ringlets were smoothed out and braided on her poor thin cheek—
braided elaborately with a care and study worthy of something more
important; her step tottered a little; when any one spoke to her, a
little gush of tears came to her eyes; but, notwithstanding, there was
a solemnity and importance in the hush of Miss Annie’s manner,
which no one had ever seen in her before. Half-a-dozen times that
day she asked, in a startling whisper, “Menie, when is he to come?”
Poor Menie, sick at heart, could scarcely bear this slow prolonging of
her pain.
CHAPTER XXVI.
“Aunt, he has come.”
No one knows; July is out on a ramble in this pleasant heath,
where she cannot lose herself; Mrs Laurie has gone out for some
private errands of her own. In her first day, Menie has managed well.
True, they all know that Menie has been wearied last night; that her
eye looks dull and heavy; that her cheek has lost its slight bloom of
colour; that she says something of a headache; but nobody knows
that headache has come to be with Menie Laurie as with many
another, only a softer word for heartache—no one suspects that the
quiet heart, which feared no evil when this spring began, is now a
battle-ground, and field of contest, and that sometimes, when she
sits quiet in outward seeming, she could leap up with a start and
scream, and feels as if madness would come to her underneath their
unsuspicious eyes.
“Aunt, he has come.”
Miss Annie Laurie is very nervous; she has to be supported on
Menie’s arm as they go down stairs. “You will make it all up, Menie;
yes, my darling;” but Miss Annie’s head nods spasmodically, and
there is a terrified troubled expression about her face, which looks so
meagre in its outline under that braided hair.
Slightly disturbed, something haughty, rather wondering what
Menie has got to say for herself, Randall sits waiting in the drawing-
room. It is no small surprise to him to see Miss Annie—especially to
see her so moved and nervous; and Randall restrains, with visible
displeasure, the words which rose to his lips on Menie’s entrance,
and coldly makes his bow to the lady of the house.
“My dear Mr Home, I am very much grieved; I hope you are ready
to make it all up,” murmurs Miss Annie; but she trembles so much
that it is not easy to hear what she says, except the last words, which
flush Randall’s cheek with a sudden disdainful anger. A lovers’
quarrel!—that he should be fancied capable of this.
“My aunt has come with me,” said Menie steadily, “to give the
weight of her presence to what I say. Randall, I do not pretend that
my own feelings are changed, or that I have ceased to care for you. I
do not need to seem to quarrel, or to call you by a less familiar name.
We know the reason both of us; there is no use for discussing it—and
I have come to have it mutually understood that our engagement is
broken. We will go away very soon. I came to say good-by.”
Before she concluded, Menie had bent her head, and cast down her
wavering eyes upon Miss Annie’s hand, which she held firmly in her
own. Her voice was very low, her words quick and hurried; she stood
beside Miss Annie’s chair, holding fast, and twining in her own Miss
Annie’s nervous fingers; but she did not venture to look up to meet
Randall’s eyes.
“What does this mean? it is mere trifling, Menie,” said Randall
impatiently. “You hear a gossip’s story of something I said; true or
false, it did not affect you—it had no bearing on you; you know very
well that nothing has happened to make you less precious to me—
that nothing can happen which will ever change my heart. Menie,
this is the second time; is this the conduct I have a right to expect
from you? Deal with me frankly; I have a title to it. What do you
mean?”
“My darling, he will make it up,” said Miss Annie, with a little
overflow of tears.
But Menie was very steady—so strange, so strange—she grew into a
startling acquaintance with herself in these few hours. Who could
have thought there were so many passionate impulses in Menie
Laurie’s quiet heart?
“We will not discuss it, Randall,” she said again; “let us simply
conclude that it is best for both of us to withdraw. Perhaps you will
be better content if I speak more strongly,” she continued, with a
little trembling vehemence, born of her weakness, “if I say it is
impossible—impossible—you understand the word—to restore the
state of mind, the hope, the trust, and confidence that are past. No—
let us have no explanation—I cannot bear it, Randall. Do we not
understand each other already? Nothing but parting is possible for
us—for me. I think I am saying what I mean to say—good-by.”
“Look at me, Menie.”
It is hard to do it—hard to lift up those eyes, so full of tears—hard
to see his lips quiver—hard to see the love in his face; but Menie’s
eyes fall when they have endured this momentary ordeal; and again
she holds out her hand and says, “Good-by.”
“Good-by—I answer you,” said Randall, wringing her hand, and
throwing it out of his grasp. “Good-by—you are disloyal, Menie,
disloyal to Nature and to me; some time you will remember this; now
I bid you farewell.”
Something crossed her like an angry breath—something rang in
her ears, confused and echoing like the first drops of a thunder-
shower; and Menie can see nothing in all the world but Miss Annie
weeping upon her hand, and, like a culprit, steals away—steals away,
not knowing where she goes—desolate, guilty, forsaken, feeling as if
she had done some grievous wrong, and was for ever shut out from
peace or comfort in this weary world.
Yes—there is no one to see you. Lie down upon the ground, Menie
Laurie—down, down, where you can be no lower, and cover your eyes
from the cheerful light. How they pour upon you, these dreadful
doubts and suspicions of yourself!—wisely—wisely—what should
make it wise, this thing you have done? You yourself have little
wisdom, and you took no counsel. If it was not wise, what then?—it is
done, and there is nothing for it now but to be content.
CHAPTER XXVII.
“It must not be—I cannot permit it,” said Mrs Laurie. “Menie, is
this all that your mother deserves at your hands? to take such a step
as this without even telling me—without giving me an opportunity of
remonstrance? Menie! Menie!”
And with hasty steps Mrs Laurie paces backward and forward the
narrow room. Beside the window, very pale, Menie stands with a
half-averted face, saying nothing—very pale—and there is a sullen
suffering in Menie Laurie’s darkened face.
“I cannot have it—I will not permit it”—Mrs Laurie is much
excited. “My own honour is compromised; it will be said it is I who
have separated you. Menie! it is strange that you should show so
little regard either to Randall or to me. I must do something—I must
make an effort—I cannot have this.”
“Mother, hear me,” exclaimed Menie. “No one shall do anything; I
will not bear it either. In everything else you shall make of me what
you will—here I am not to be swayed; I must decide this for myself—
and I have decided it, mother.”
With astonished eyes Mrs Laurie looked upon her daughter’s face.
Flushed with passion, full of a fierce unrespecting will—was this
Menie Laurie? but her mother turned aside from her. “I am sorry,
Menie—I am very sorry—to see you show such a spirit; another time
I will speak of it again.”
Another time!—Menie Laurie laughed a low laugh when her
mother left the room. Something like a scowl had come to Menie’s
brow; a dark abiding cloud was on her face; and in her heart such
bitterness and universal disappointment as killed every gentle feeling
in her soul: disloyal to the one love, disrespectful and disobedient to
the other—bitterly Menie’s heart turned upon itself—she had pleased
no one; her life was nothing but a great blot before her. She was
conscious of a host of evil feelings—evil spirits waging war with one
another in her vexed and troubled mind. Sullenly she sat down once
more upon the ground, not to seek if there was any comfort in the
heavens above or the earth beneath, but to brood upon her grief, and
make it darker, till the clouds closed over her, and swallowed her up,
and not a star remained.
There is a certain obstinate gloomy satisfaction in despair. To
decide that everything is hopeless—that nothing can be done for you
—that you have reached to the pre-eminence of woe—no wonder
Menie’s face was dark and sullen—she had come to this point now.
Like a thunder-storm this intelligence came upon little July Home
—she could not comprehend it, and no one took the trouble to
explain to her. Lithgow, knowing but the fact, was surprised and
grieved, and prophesied their reunion; but no hope was in Menie’s
sullen gravity—none in the haughty resentment of Randall Home.
And Mrs Laurie once more with a troubled brow considers of her
future—will Menie be best in the Dumfriesshire cottage, where no
one will see their poverty, or pursuing some feminine occupation
among the other seamstresses, teachers, poor craftswomen of a less
solitary place? For now that all is done that can be done, there is no
hope of recovering anything of the lost income,—and Mrs Laurie will
not live on Miss Annie’s bounty. She is anxious with all her heart to
be away.
Miss Annie herself has not recovered her trial: autumn winds grow
cold at night—autumn rains come down sadly upon the little world
which has had its cheerfulness quenched out of it—and when Randall
takes away his little sister to carry her home, Miss Annie looks a
mournful old woman, sitting there wrapped up by the early lighted
fire. These two or three mornings she has even been seen at the
breakfast-table with a cap protecting the head which is so sadly apt
to take cold—and Miss Annie cries a little to herself, and tells bits of
her own love-story to Menie, absorbed and silent, who sits
unanswering beside her—and moans to herself sadly sometimes,
over this other vessel of youthful life, cast away.
But Miss Annie Laurie never wears ringlets more. Strangely upon
her conscience, like a reproach for her unnatural attenuated youth,
came Menie’s appeal to her for help and comfort. Feeling herself so
frivolous and feeble, so unable to sustain or strengthen, Miss Annie
made a holocaust of her curls, and was satisfied. So much vanity was
relinquished not without a struggle; but great comfort came from the
sacrifice to the heroic penitent.
And Jenny, discontented and angry with them all, furiously now
takes the part of Randall Home, and wonders, in a fuff and outburst,
what Miss Menie can expect that she “lightlies” a bonny lad like yon.
A great change has taken place on Menie; no one can say it is for the
better—and sullenly and sadly this bright year darkens over the
house of Heathbank.
CHAPTER XXVIII.
“You’re to bide away—you’re no to come near this place. Na, you
may just fecht; but you’ve nae pith compared to Jenny, for a’ sae auld
and thrawn as Jenny has been a’ her days. It’s no me just—it’s your
mamma and the doctor. Bairn! will you daur struggle wi’ me?”
But Menie would dare struggle with any one—neither command
nor resistance satisfies her.
“Let me in—I want to see my mother.”
“You can want your mother for a day—there’s mair than you
wanting her. That puir auld haverel there—guid forgi’e me—she’s a
dying woman—has sairer lack o’ her than you. Keep to your ain place,
Menie Laurie—muckle made o’—muckle thocht o’—but you’re only a
bairn for a’ that—you’re no a woman of judgment like your mamma
or me. I tell you to gang away—I will not let you in.”
And Jenny stood firm—a jealous incorruptible sentinel in the
passage which led to Miss Annie Laurie’s room. “Miss Menie, ye’ll no
take it ill what I say,” said Jenny; “there’s death in the house, or fast
coming. I ken what the doctor means. Gang you ben the house, like a
good bairn; look in your ain glass, and see if there should be a face
like that in a house where He comes.”
Menie looked silently into the countenance before her—the keen,
impatient, irascible face; but it was easy to see a hasty tear dashed
away from Jenny’s cheek.
And without another word, Menie Laurie turned away. Some
withered leaves are lying on the window-sill—the trees are yielding
up their treasures, dropping them down mournfully to the
disconsolate soil—but the meagre yew-tree rustles before her, darkly
green in its perennial gloom. Rather shed the leaves, the hopes—
rather yield to winter meekly for the sake of spring—rather be cut
down, and rooted up altogether, than grow to such a sullen
misanthrope as this.
And Menie Laurie looks into her own face; this gloomy brow—
these heavy eyes—are these the daylight features of Menie Laurie?—
the interpretation of her heart? Earnestly and long she reads—no
lesson of vanity, but a stern sermon from that truthful mirror. Hush!
—listen!—what was that?—a cry!
The doctor is leaving Miss Annie Laurie’s room—the cry is over—
there is only now a feeble sound of weeping; but a shadow strangely
still and sombre has fallen upon the house, and the descending step
rings like a knell upon the stairs. What is it?—what is coming?—and
what did it mean, that melancholy cry?
Alas! a voice out of a startled soul—a cry of wild and terrified
recognition—acknowledgment. Years ago, age came gently to this
dwelling—gently, with light upon his face, and honour on his grey
hairs. There was no entrance for him through the jealous door; but
now has come another who will not be gainsaid.
Gather the children, Reaper—gather the lilies—take the corn full in
the ear—go to the true souls where thought of you dwells among
thoughts of other wonders, glories, solemn things to come—leave this
chamber here with all its poor devices. No such presence has ever
stood within its poverty-stricken walls before. Go where great love,
great hope, great faith, great sorrow, sublimer angels, have made you
no phantom—leave this soul to its toys and delusions—it is a poor
triumph—come not here.
Hush, be still. They who have sent him have charged him with a
message; hear it how it rings slow and solemn into the ear of this
hushed house. “There is a way, and it shall be called the way of
holiness; the wayfaring man, though a fool, shall not err therein.”
Stay your weeping, poor fool—poor soul; prayers have gone up for
you from the succoured hearts of some of God’s poor. Unawares, in
your simplicity, you have lent to the Lord. Your gracious debtor gives
you back with the grand usury of heaven—gives you back opportunity
—hope—a day to be saved—lays aside those poor little vanities of
yours under the cover of this, His great magnanimous divine grace—
and holds open to your feeble steps the way, where wayfaring men,
though fools, shall not err any more for ever.
“I’ll let you pass, Miss Menie, if you’ll bide a moment,” said Jenny,
wiping her eyes; “he says it’s no the fever he thought it was, but just a
natural decay. Did you hear yon? she wasna looking for Him that’s at
the door, and He’ll no wait lang where ance He’s gi’en His summons
—pity me! I would like to see him coming the road mysel, afore I just
found him at my door-stane.”
The room is very still; through the quiet you can only hear the
panting of a frightened breath, and now and then a timid feeble sob.
She has to go away—knows and feels to the depth of her heart that
she must go upon this solemn road alone; but, with a sad panic of
terror and curiosity, she watches her own feelings, wondering if this
and this be death.
And now they sit and read to her while the daylight flushes in noon
—while it fades and wanes into the night—the night and dark of
which she has a childish terror—read to her this gracious blessed
Gospel, which does not address itself alone to the wise and noble, but
is for the simple and for fools. Safe ground, poor soul, safe ground—
for this is no scheme of eclecticism, no portal to the pagan heavens—
and you cannot know yourself so low, so mean, as to escape the
range of this great wide embracing arm.
“I have not done all that I ought to have done,” murmurs poor
Miss Annie. “Don’t leave me:” for she cannot rest except some one
holds her hand, and has a faint superstitious trust in it, as if it held
her sure.
A little pause—again the fingers close tightly upon the hand they
hold. “I never did any harm.” The words are so sad—so sad—falling
out slow and feeble upon the hushed air of this darkening room.
“But I never did any good—never, never.” The voice grows
stronger. “Does anybody think I did? I—I—I never was very wise. I
used to try to be kind sometimes;” and in a strain of inarticulate
muttering, the sound died away once more.
And then again the voice of the reader broke the silence. They
scarcely thought the sufferer listened; for ever and anon she broke
forth in such wavering self-justifications, self-condemnings, as these.
But now there is a long silence; strange emotions come and go upon
this old, old, withered face. The tears have been dried from her eyes
for hours; now they come again, bedewing all her poor thin cheeks;
but a strange excitement struggles with her weakness. Looking about
to her right hand and to her left, the dying woman struggles with an
eager defiance—struggles till, at a sudden climax, her broken voice
breaks forth again.
“Who said it was me—me—it’s not me! I never could win anything
in this world—nothing in this world—not a heart to care for me. Do
you think I could win Heaven? I say it is not me; it’s for His sake.
“For His sake—for His sake.” If it is a prayer that ends thus—if it is
a sudden assurance of which she will not loose her hold for ever—no
one can know; for by-and-by her panic returns upon Miss Annie.
Close in her own cold fingers she grasps the hand of Menie Laurie,
and whispers, “Is it dark—is it so dark to you?” with again a thrill of
terror and trembling, and awful curiosity, wondering if this,
perchance, is the gloom of death.
“It is very dark—it is almost night.” The lamp is lighted on the
table; let some one go to her side, and hold this other poor
wandering hand. “Oh! not in the night—not in the night—I am afraid
to go out in the night,” sobs poor Miss Annie; and with a dreadful
suspicion in her eyes, as if of some one drawing near to murder her,
she watches the falling of this fated night.
A solemn vigil—with ever that tight and rigid pressure upon their
clasped hands. Mother and daughter, silent, pale, keep the watch
together; and below, the servants sit awe-stricken, afraid to go to
sleep. Jenny, who is not afraid, goes about the stairs, up and down,
from room to room, sometimes serving the watchers, sometimes only
straying near them, muttering, after her fashion, words which may
be prayers, and dashing off now and then an intrusive tear.
Still, with many a frightened pause—many a waking up, and little
pang of terror, this forlorn heart wanders back into the life which is
ending now—wanders back to think herself once more engaged in the
busier scenes of her youth, in the little occupations, the frivolities
and gaiety of her later years; but howsoever her mind wanders, she
never ceases to fix her eyes upon the span of sky glittering with a
single star, which shines pale on her through the window from
which, to please her, they have drawn the curtain. “I am afraid to go
out in the dark;” again and again she says it with a shudder, and a
tightened hold upon their hands—and steadfastly watches the night.
At last her eyes grow heavy—she has fallen asleep. Little reverence
has Miss Annie won at any time of all her life—but the eyes that look
on her are awed and reverent now. Slowly the hours pass by—slowly
the gradual dawn brightens upon her face—the star has faded out of
the heavens—on her brow, which is the brow of death, the daylight
glows in one reviving flush. The night is over for evermore.
And now her heavy eyes are opened full—her feeble form is raised;
and, with a cry of joy, she throws out her arms to meet the light. Lay
her down tenderly; her chains are broken in her sleep; now she no
more needs the pressure of your kindly hands. Lay her down, she is
afraid no longer; for not in the night, or through the darkness, but
with the morning and the sun, the traveller fares upon her way—
where fools do not err. By this time they have taken her in yonder at
the gate. Lay down all that remains of her to its rest.
CHAPTER XXIX.
The curtains are drawn again in Miss Annie Laurie’s house of
Heathbank—drawn back from the opened windows to let the fresh
air and the sunshine in once more to all the rooms. With a long
breath and sigh of relief, the household throws off its compelled
gloom. With all observances of honour, they have laid her in her
grave, and a few natural tears have been wept—a few kindly words
spoken—a reverent memento raised to name the place where she
lies. Now she is passed away and forgotten, her seat empty—her
house knowing her no more.
In Miss Annie’s desk, a half-written paper—intimating vaguely
that, in case of “anything happening” to her at any future time, she
wished all that she had to be given to Menie Laurie—was found
immediately after the funeral. But some superstitious terror had
prevented her from finishing it, far more from making a will. Menie
was her next of kin; it pleased them to have this sanction of her
willingness to the inheritance of the natural heir.
Miss Annie had been rather given to speak of her savings; but no
vestige of these savings was to be found. She had practised this on
herself like many another delusion; and saving the furniture of
Heathbank, and a profusion of ornaments not valuable, there
remained little for Menie to inherit. Miss Annie’s maid was her well-
known favourite, and had been really attentive, and a good servant to
her indulgent mistress. Her name was mentioned in the half-written
paper, and Maria’s own report of many conversations, modestly
hinted at a legacy. Miss Annie’s furniture, pretty and suitable for her
house as it was, was not valuable in a sale; and Mrs Laurie, acting for
her daughter, bestowed almost the whole amount received for it
upon Maria, as carrying out the will of her mistress. Having done
this, they had done all, Mrs Laurie thought, and would now go home
to live as they could upon what remained to them. Burnside, with all
its plenishing, brought in no greater revenue than fifty pounds a-
year, and Mrs Laurie had two or three hundred pounds “in the
bank.” This was all. She began to calculate painfully what the home-
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com