Database Reference
In-Depth Information
•
Set the Size property's Width to 87 and Height to 13.
•
Set the Text property to Total Row Count.
4.
Drag a TextBox control to the form and position it next to the Label control.
Select this TextBox control, navigate to the Properties window, and set the
following properties:
•
Set the Name property to txtScalar.
•
Set the Location property's X to 97 and Y to 12.
•
Set the Multiline property to True.
•
Set the ScrollBars property to Both.
•
Set the Size property's Width to 164 and Height to 65.
•
Leave the Text property blank.
5.
Drag a Button control to the form, and position it next to the TextBox. Select
this Button control, navigate to the Properties window, and set the following
properties:
•
Set the Name property to btnRowCount.
•
Set the Location property's X to 269 and Y to 30.
•
Set the Size property'sWidth to 88 and Height to 23.
•
Set the Text property to Count Rows.
6.
Now your CommandScalar form in the Design view should like Figure 13-3.
Figure 13-3.
The Design view of the CommandScalar form
7.
Double-click the Button control; it will open the code editor window, showing
the
btnRowCount_Click
event. Place the code into the
click
event code
template so it looks like Listing 13-2.