|
The Form design,
BookForm.cs
1st
TabPage selected of TabControl
control.. |
2nd
TabPage selected of TabControl
control.. |
 |
 |
Create Visual C# .Net Forn - AboutForm.cs
Classes used in this
Form: OleDbConnection,
OleDbDataAdapter, OleDbCommand, DataSet, PictureBox,
Label, TextBox, Button,
TabControl, ListView, ComboBox, RichTextBox
1- Database file - KJV2002.mdb - c:\App-VCSNet\Pic\KJV2002.mdb
- On the Projet menu
, click Add Existing Item ..., Add Existing Item -
App-VCSNet dialog box appears, select the file KJV2002.mdb of the folder
c:\AppP-VCSNet\Pic, and then click
Open.
2- Create
the Form book
- On the View menu ,
click Solution Explorer
- In Solution
Explorer, right click the App-VCSNet, select Add
on the shortcut menu to open other shortcut menu, click
Add New Item, the Add New Item - App-VCSNet dialog
box appears.
- In the Add New
Item -App-VCSNet dialog box:
- In the Categories
pane, select Local Project Items
- In the Templates
pane, select Data Form Wizard . A message
appears - (a form for Windows
Applications).
Note:
The
Data Form Wizard create Windows Form with
data-bound controls. The controls display data from any
data source you specify. The data component for this form
consists:
- A
connection to a data source-(her the datasource -
C:\App-VCSNet\Pic\KJV2002.mdb.
- A data
adapter .
- A typed
dataset to hold the records fetched from the
database
|
- In the Name
box, type BookForm.cs
- Click Open, the
Data Form Wizard dialog box appears.
|
the Data
Form Wizard will create a new form with data-bound
controls.
- In the 1st page of
this dialog, click Next
- In the 2nd page,
select the Create a new dataset named
radioButton,
in the box type Bookdset
and then click Next
- In the 3rd page,
click New Connection, the Data Link Properties
dialog box appears.
- In the Provider
tab of the Data Link Properties dialog box,
select Microsoft Jet 4.0 OLEDB Provider and then
click Next
- In the
Connection tab, in the Select or enter a database
name box type C:\App-VCSNet\Pic\KJV2002.mdb and then click
Ok
|
and then click
Next.
- In the 4th page,
pick and move the BibleTable from the Available
item(s) list to the Selected item(s) list and then
click Next
- In the 5th page,
from the Master or Single table combobox select
BibleTable, from the Columns list check all Checkbox es
(all Fields items Book, BookTitle, Chapter, Verse
and TextData ) and then click Next
- In the 6th page,
select the Single record in individual controls radio
button, check only the Navigation controls check
box and then click Finish.
The do you
want to include the password in the connection string dialog
box appears. In this dialog click Don't include
password.
Note: In
the Windows Forms Designer appears the design
form created and in the Properties Windows displays the
corresponding properties
The design Form created
...
The Code Created
...
using
System; using
System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace App_VCSNet
{
///
<summary>
///
Summary description for BookForm.
///
</summary>
public
class
BookForm : System.Windows.Forms.Form
{
private
System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
private
System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
private
System.Data.OleDb.OleDbConnection oleDbConnection1;
private
System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
private
App_VCSNet.Bookdset objBookdset;
private
System.Windows.Forms.Button btnLoad;
private
System.Windows.Forms.Button btnUpdate;
private
System.Windows.Forms.Label lblBook;
private
System.Windows.Forms.Label lblBookTitle;
private
System.Windows.Forms.Label lblChapter;
private
System.Windows.Forms.TextBox editBook;
private
System.Windows.Forms.TextBox editBookTitle;
private
System.Windows.Forms.TextBox editChapter;
private
System.Windows.Forms.Label lblTextData;
private
System.Windows.Forms.Label lblVerse;
private
System.Windows.Forms.TextBox editTextData;
private
System.Windows.Forms.TextBox editVerse;
private
System.Windows.Forms.Button btnNavFirst;
private
System.Windows.Forms.Button btnNavPrev;
private
System.Windows.Forms.Label lblNavLocation;
private
System.Windows.Forms.Button btnNavNext;
private
System.Windows.Forms.Button btnLast;
///
<summary>
///
Required designer variable.
///
</summary>
private
System.ComponentModel.Container components =
null;
public
BookForm()
{
//
// Required for
Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any
constructor code after InitializeComponent call
//
}
///
<summary>
///
Clean up any resources being used.
///
</summary>
protected
override
void
Dispose( bool
disposing )
{
if(
disposing )
{
if(components
!= null)
{
components.Dispose();
}
}
base.Dispose(
disposing );
}
#region Windows Form Designer
generated code
///
<summary>
///
Required method for Designer support - do not modify
///
the contents of this method with the code editor.
///
</summary>
private
void
InitializeComponent()
{
this.oleDbSelectCommand1
= new
System.Data.OleDb.OleDbCommand();
this.oleDbInsertCommand1
= new
System.Data.OleDb.OleDbCommand();
this.oleDbConnection1
= new
System.Data.OleDb.OleDbConnection();
this.oleDbDataAdapter1
= new
System.Data.OleDb.OleDbDataAdapter();
this.objBookdset
= new
App_VCSNet.Bookdset();
this.btnLoad
= new
System.Windows.Forms.Button();
this.btnUpdate
= new
System.Windows.Forms.Button();
this.lblBook
= new
System.Windows.Forms.Label();
this.lblBookTitle
= new
System.Windows.Forms.Label();
this.lblChapter
= new
System.Windows.Forms.Label();
this.editBook
= new
System.Windows.Forms.TextBox();
this.editBookTitle
= new
System.Windows.Forms.TextBox();
this.editChapter
= new
System.Windows.Forms.TextBox();
this.lblTextData
= new
System.Windows.Forms.Label();
this.lblVerse
= new
System.Windows.Forms.Label();
this.editTextData
= new
System.Windows.Forms.TextBox();
this.editVerse
= new
System.Windows.Forms.TextBox();
this.btnNavFirst
= new
System.Windows.Forms.Button();
this.btnNavPrev
= new
System.Windows.Forms.Button();
this.lblNavLocation
= new
System.Windows.Forms.Label();
this.btnNavNext
= new
System.Windows.Forms.Button();
this.btnLast
= new
System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)( this.objBookdset)).BeginInit();
this.SuspendLayout();
//
//
oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText
= "SELECT Book, BookTitle, Chapter, TextData, Verse FROM
BibleTable";
this.oleDbSelectCommand1.Connection
= this.oleDbConnection1;
//
//
oleDbInsertCommand1
//
this.oleDbInsertCommand1.CommandText
= "INSERT INTO BibleTable(Book, BookTitle, Chapter,
TextData, Verse) VALUES (?, ?, ?" +
", ?, ?)";
this.oleDbInsertCommand1.Connection
= this.oleDbConnection1;
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Book",
System.Data.OleDb.OleDbType.VarWChar, 50, "Book"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("BookTitle",
System.Data.OleDb.OleDbType.VarWChar, 50, "BookTitle"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Chapter",
System.Data.OleDb.OleDbType.VarWChar, 50, "Chapter"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("TextData",
System.Data.OleDb.OleDbType.VarWChar, 0, "TextData"));
this.oleDbInsertCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Verse",
System.Data.OleDb.OleDbType.VarWChar, 50, "Verse"));
//
//
oleDbConnection1
//
this.oleDbConnection1.ConnectionString
= @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry
Path=;Jet OLEDB:Database Locking Mode=1;Data Source=""C:\App_VCSNet\pic\KJV2002.mdb"";Jet
OLEDB:Engine Type=5;Jet OLEDB:Global Bulk
Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet
OLEDB:System database=;Jet OLEDB:SFP=False;persist
security info=False;Extended Properties=;Mode=Share Deny
None;Jet OLEDB:Create System Database=False;Jet
OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact
Without Replica Repair=False;User ID=Admin;Jet
OLEDB:Encrypt Database=False";
//
//
oleDbDataAdapter1
//
this.oleDbDataAdapter1.InsertCommand
= this.oleDbInsertCommand1;
this.oleDbDataAdapter1.SelectCommand
= this.oleDbSelectCommand1;
this.oleDbDataAdapter1.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new
System.Data.Common.DataTableMapping("Table", "BibleTable",
new
System.Data.Common.DataColumnMapping[] {
new
System.Data.Common.DataColumnMapping("Book", "Book"),
new
System.Data.Common.DataColumnMapping("BookTitle", "BookTitle"),
new
System.Data.Common.DataColumnMapping("Chapter",
"Chapter"),
new
System.Data.Common.DataColumnMapping("TextData", "TextData"),
new
System.Data.Common.DataColumnMapping("Verse",
"Verse")})});
//
// objBookdset
//
this.objBookdset.DataSetName
= "Bookdset";
this.objBookdset.Locale
= new
System.Globalization.CultureInfo("en-US");
//
// btnLoad
//
this.btnLoad.Location
= new
System.Drawing.Point(10, 10);
this.btnLoad.Name
= "btnLoad";
this.btnLoad.TabIndex
= 0;
this.btnLoad.Text
= "&Load";
this.btnLoad.Click
+= new
System.EventHandler(this.btnLoad_Click);
//
// btnUpdate
//
this.btnUpdate.Location
= new
System.Drawing.Point(365, 10);
this.btnUpdate.Name
= "btnUpdate";
this.btnUpdate.TabIndex
= 1;
this.btnUpdate.Text
= "&Update";
this.btnUpdate.Click
+= new
System.EventHandler(this.btnUpdate_Click);
//
// lblBook
//
this.lblBook.Location
= new
System.Drawing.Point(10, 43);
this.lblBook.Name
= "lblBook";
this.lblBook.TabIndex
= 2;
this.lblBook.Text
= "Book";
//
// lblBookTitle
//
this.lblBookTitle.Location
= new
System.Drawing.Point(10, 76);
this.lblBookTitle.Name
= "lblBookTitle";
this.lblBookTitle.TabIndex
= 3;
this.lblBookTitle.Text
= "BookTitle";
//
// lblChapter
//
this.lblChapter.Location
= new
System.Drawing.Point(10, 109);
this.lblChapter.Name
= "lblChapter";
this.lblChapter.TabIndex
= 4;
this.lblChapter.Text
= "Chapter";
//
// editBook
//
this.editBook.DataBindings.Add(new
System.Windows.Forms.Binding("Text",
this.objBookdset,
"BibleTable.Book"));
this.editBook.Location
= new
System.Drawing.Point(120, 43);
this.editBook.Name
= "editBook";
this.editBook.TabIndex
= 5;
this.editBook.Text
= "";
//
// editBookTitle
//
this.editBookTitle.DataBindings.Add(new
System.Windows.Forms.Binding("Text",
this.objBookdset,
"BibleTable.BookTitle"));
this.editBookTitle.Location
= new
System.Drawing.Point(120, 76);
this.editBookTitle.Name
= "editBookTitle";
this.editBookTitle.TabIndex
= 6;
this.editBookTitle.Text
= "";
//
// editChapter
//
this.editChapter.DataBindings.Add(new
System.Windows.Forms.Binding("Text",
this.objBookdset,
"BibleTable.Chapter"));
this.editChapter.Location
= new
System.Drawing.Point(120, 109);
this.editChapter.Name
= "editChapter";
this.editChapter.TabIndex
= 7;
this.editChapter.Text
= "";
//
// lblTextData
//
this.lblTextData.Location
= new
System.Drawing.Point(230, 43);
this.lblTextData.Name
= "lblTextData";
this.lblTextData.TabIndex
= 8;
this.lblTextData.Text
= "TextData";
//
// lblVerse
//
this.lblVerse.Location
= new
System.Drawing.Point(230, 76);
this.lblVerse.Name
= "lblVerse";
this.lblVerse.TabIndex
= 9;
this.lblVerse.Text
= "Verse";
//
// editTextData
//
this.editTextData.DataBindings.Add(new
System.Windows.Forms.Binding("Text",
this.objBookdset,
"BibleTable.TextData"));
this.editTextData.Location
= new
System.Drawing.Point(340, 43);
this.editTextData.Name
= "editTextData";
this.editTextData.TabIndex
= 10;
this.editTextData.Text
= "";
//
// editVerse
//
this.editVerse.DataBindings.Add(new
System.Windows.Forms.Binding("Text",
this.objBookdset,
"BibleTable.Verse"));
this.editVerse.Location
= new
System.Drawing.Point(340, 76);
this.editVerse.Name
= "editVerse";
this.editVerse.TabIndex
= 11;
this.editVerse.Text
= "";
//
// btnNavFirst
//
this.btnNavFirst.Location
= new
System.Drawing.Point(195, 142);
this.btnNavFirst.Name
= "btnNavFirst";
this.btnNavFirst.Size
= new
System.Drawing.Size(40, 23);
this.btnNavFirst.TabIndex
= 12;
this.btnNavFirst.Text
= "<<";
this.btnNavFirst.Click
+= new
System.EventHandler(this.btnNavFirst_Click);
//
// btnNavPrev
//
this.btnNavPrev.Location
= new
System.Drawing.Point(235, 142);
this.btnNavPrev.Name
= "btnNavPrev";
this.btnNavPrev.Size
= new
System.Drawing.Size(35, 23);
this.btnNavPrev.TabIndex
= 13;
this.btnNavPrev.Text
= "<";
this.btnNavPrev.Click
+= new
System.EventHandler(this.btnNavPrev_Click);
//
// lblNavLocation
//
this.lblNavLocation.BackColor
= System.Drawing.Color.White;
this.lblNavLocation.Location
= new
System.Drawing.Point(270, 142);
this.lblNavLocation.Name
= "lblNavLocation";
this.lblNavLocation.Size
= new
System.Drawing.Size(95, 23);
this.lblNavLocation.TabIndex
= 14;
this.lblNavLocation.Text
= "No Records";
this.lblNavLocation.TextAlign
= System.Drawing.ContentAlignment.MiddleCenter;
//
// btnNavNext
//
this.btnNavNext.Location
= new
System.Drawing.Point(365, 142);
this.btnNavNext.Name
= "btnNavNext";
this.btnNavNext.Size
= new
System.Drawing.Size(35, 23);
this.btnNavNext.TabIndex
= 15;
this.btnNavNext.Text
= ">";
this.btnNavNext.Click
+= new
System.EventHandler(this.btnNavNext_Click);
//
// btnLast
//
this.btnLast.Location
= new
System.Drawing.Point(400, 142);
this.btnLast.Name
= "btnLast";
this.btnLast.Size
= new
System.Drawing.Size(40, 23);
this.btnLast.TabIndex
= 16;
this.btnLast.Text
= ">>";
this.btnLast.Click
+= new
System.EventHandler(this.btnLast_Click);
//
// BookForm
//
this.AutoScaleBaseSize
= new
System.Drawing.Size(5, 13);
this.ClientSize
= new
System.Drawing.Size(442, 173);
this.Controls.Add(this.btnLoad);
this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.lblBook);
this.Controls.Add(this.lblBookTitle);
this.Controls.Add(this.lblChapter);
this.Controls.Add(this.editBook);
this.Controls.Add(this.editBookTitle);
this.Controls.Add(this.editChapter);
this.Controls.Add(this.lblTextData);
this.Controls.Add(this.lblVerse);
this.Controls.Add(this.editTextData);
this.Controls.Add(this.editVerse);
this.Controls.Add(this.btnNavFirst);
this.Controls.Add(this.btnNavPrev);
this.Controls.Add(this.lblNavLocation);
this.Controls.Add(this.btnNavNext);
this.Controls.Add(this.btnLast);
this.Name
= "BookForm";
this.Text
= "BookForm";
((System.ComponentModel.ISupportInitialize)( this.objBookdset)).EndInit();
this.ResumeLayout(false);
}
#endregion
public
void
FillDataSet(App_VCSNet.Bookdset dataSet)
{
// Turn off
constraint checking before the dataset is filled.
// This allows
the adapters to fill the dataset without concern
// for
dependencies between the tables.
dataSet.EnforceConstraints =
false;
try
{
// Open the
connection.
this.oleDbConnection1.Open();
// Attempt to
fill the dataset through the OleDbDataAdapter1.
this.oleDbDataAdapter1.Fill(dataSet);
}
catch
(System.Exception fillException)
{
// Add your error
handling code here.
throw
fillException;
}
finally
{
// Turn
constraint checking back on.
dataSet.EnforceConstraints =
true;
// Close the
connection whether or not the exception was thrown.
this.oleDbConnection1.Close();
}
}
public
void
UpdateDataSource(App_VCSNet.Bookdset ChangedRows)
{
try
{
// The data
source only needs to be updated if there are changes
pending.
if
((ChangedRows !=
null))
{
// Open the
connection.
this.oleDbConnection1.Open();
// Attempt to
update the data source.
oleDbDataAdapter1.Update(ChangedRows);
}
}
catch
(System.Exception updateException)
{
// Add your error
handling code here.
throw
updateException;
}
finally
{
// Close the
connection whether or not the exception was thrown.
this.oleDbConnection1.Close();
}
}
public
void
LoadDataSet()
{
// Create a new
dataset to hold the records returned from the call to
FillDataSet.
// A temporary
dataset is used because filling the existing dataset would
// require the
databindings to be rebound.
App_VCSNet.Bookdset objDataSetTemp;
objDataSetTemp =
new App_VCSNet.Bookdset();
try
{
// Attempt to
fill the temporary dataset.
this.FillDataSet(objDataSetTemp);
}
catch
(System.Exception eFillDataSet)
{
// Add your error
handling code here.
throw
eFillDataSet;
}
try
{
// Empty the old
records from the dataset.
objBookdset.Clear();
// Merge the
records into the main dataset.
objBookdset.Merge(objDataSetTemp);
}
catch
(System.Exception eLoadMerge)
{
// Add your error
handling code here.
throw
eLoadMerge;
}
}
public
void
UpdateDataSet()
{
// Create a new
dataset to hold the changes that have been made to the
main dataset.
App_VCSNet.Bookdset objDataSetChanges =
new
App_VCSNet.Bookdset();
// Stop any
current edits.
this.BindingContext[objBookdset,"BibleTable"].EndCurrentEdit();
// Get the
changes that have been made to the main dataset.
objDataSetChanges = ((App_VCSNet.Bookdset)(objBookdset.GetChanges()));
// Check to see
if any changes have been made.
if
((objDataSetChanges !=
null))
{
try
{
// There are
changes that need to be made, so attempt to update the
datasource by
// calling the
update method and passing the dataset and any parameters.
this.UpdateDataSource(objDataSetChanges);
objBookdset.Merge(objDataSetChanges);
objBookdset.AcceptChanges();
}
catch
(System.Exception eUpdate)
{
// Add your error
handling code here.
throw
eUpdate;
}
// Add your code
to check the returned dataset for any errors that may have
been
// pushed into
the row object's error.
}
}
private
void
objBookdset_PositionChanged()
{
this.lblNavLocation.Text
= ((((this.BindingContext[objBookdset,"BibleTable"].Position
+ 1)).ToString() + " of ")
+ this.BindingContext[objBookdset,"BibleTable"].Count.ToString());
}
private
void
btnNavNext_Click(object
sender, System.EventArgs e)
{
this.BindingContext[objBookdset,"BibleTable"].Position
= (this.BindingContext[objBookdset,"BibleTable"].Position
+ 1);
this.objBookdset_PositionChanged();
}
private
void
btnNavPrev_Click(object
sender, System.EventArgs e)
{
this.BindingContext[objBookdset,"BibleTable"].Position
= (this.BindingContext[objBookdset,"BibleTable"].Position
- 1);
this.objBookdset_PositionChanged();
}
private
void
btnLast_Click(object
sender, System.EventArgs e)
{
this.BindingContext[objBookdset,"BibleTable"].Position
= (this.objBookdset.Tables["BibleTable"].Rows.Count
- 1);
this.objBookdset_PositionChanged();
}
private
void
btnNavFirst_Click(object
sender, System.EventArgs e)
{
this.BindingContext[objBookdset,"BibleTable"].Position
= 0;
this.objBookdset_PositionChanged();
}
private
void
btnLoad_Click(object
sender, System.EventArgs e)
{
try
{
// Attempt to
load the dataset.
this.LoadDataSet();
}
catch
(System.Exception eLoad)
{
// Add your error
handling code here.
// Display error
message, if any.
System.Windows.Forms.MessageBox.Show(eLoad.Message);
}
this.objBookdset_PositionChanged();
}
private
void
btnUpdate_Click(object
sender, System.EventArgs e)
{
try
{
// Attempt to
update the datasource.
this.UpdateDataSet();
}
catch
(System.Exception eUpdate)
{
// Add your error
handling code here.
// Display error
message, if any.
System.Windows.Forms.MessageBox.Show(eUpdate.Message);
}
this.objBookdset_PositionChanged();
}
}
} | | |
- The files -
forum.bmp, Christus-th.bmp and butterfly1.bmp
of the folder -
c:\App-VCSNet\Pic
- On the Projet
menu , click Add Existing Item ..., Add
Existing Item - App-VCSNet dialog box appears, select the files
forum.bmp, Christus-th.bmp and butterfly1.bmp
of the folder c:\App-VCSNet\Pic, and then click
Open.
|
1- |
The Properties of the Form -
bookForm. |
|
|
Old |
New |
Name: Backcolor: Icon: Maximize: Menu: Size: Start
Position: Text: Window
State: |
BookForm Control Icon True (none) 450,250 WindowsDefaultLocation BookForm Normal |
BookForm
GrayText
Icon
false
(none)
704,488
CenterScreen
BookForm ...
Normal | | |
2- |
List of controls created by the
Data Form Wizard ... One OleDbConnection
control, one OleDbDataAdapter control, one
DataSet control, six Label controls,
fiveTextBox controls and four Button
controls |
|
- The
OleDbConnection
control, created by ...-
Represents an open connection to a data
source The OleDbConnection
object of the .NET Framework Data Provider for OLE DB
provides connectivity to data sources exposed using
OLE DB The .NET Framework Data Provider for OLE DB
automatically pools connections using OLE DB session
pooling. Connection string arguments can be used to
enable or disable OLE DB services including
pooling. It is recommended
that you always close the Connection when you
are finished using it
The
OleDbConnection1
Properties:
Name: ConnectionString: |
OleDbConnection1 Jet
OLEDB:Global Partial
.... | |
Note: Connection info
:
Provider =
Microsoft.Jet.OLEDB.4.0
Data source = C:\App-VCSNet\Pic\KJV2002.mdb
- The OleDbDataAdapter
control, created by
...-
Represents a set of data
commands and a database connection that are used to
fill the DataSet and update the
data source. The OleDbDataAdapter
serves as a bridge between a DataSet and data
source for retrieving and saving data.
The
OleDbDataAdapter1
Properties:
Name: InsertCommand:
CommandText:
CommandTime:
CommandType: Connection: Parameters: SelectCommand:
CommandText:
CommandTime:
CommandType: |
OleDbDataAdapter1 OleDbInsertCommand1 INSERT
INTO BibleTable(Book, BookTitle, Chapter,
TextData, Verse) VALUES (?, ?, ?, ?,
?) 30 Text OleDbConnection1 (Collection) OleDbSelectCommand1 SELECT
Book, BookTitle, Chapter, TextData, Verse FROM
BibleTable 30 Text | |
In
OleDbDataAdapter1
Properties, when you click
Collection of Parameters property,
the OleDbParameter Collection Editor dialog box
appears This Editor is
displayed when you are using the Properties
window to configure a data adapter on a form or
component.
- The DataSet
control, created by
...-
Datasets store
data in a disconnected cache. The structure of
a dataset is similar to that of a relational
database; it exposes a hierarchical object model
of tables, rows, and columns. In addition, it contains
constraints and relationships defined for the
dataset.
The
objBKJV2002dset
Properties:
Name: DataSetName: |
objBKJV2002dset BKJV2002dset | |
- The TextBox control, created by
... - EditBook Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.Book EditBook Window Fixed3D Microsoft
Sons Serief,
8.25pt False False 100,20 | |
- The TextBox control, created by
... - EditBookTitle
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.BookTitle EditBookTitle Window Fixed3D Microsoft
Sons Serief,
8.25pt False False 100,20 | |
- The TextBox control, created by
... - EditChapter
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.Chapter EditChapter Window Fixed3D Microsoft
Sons Serief,
8.25pt False False 100,20 | |
- The TextBox control, created by
... - EditVerse
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.Verse EditVerse Window Fixed3D Microsoft
Sons Serief,
8.25pt False False 100,20 | |
- The TextBox control, created by
... - EditTextData
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.TextData EditTextData Window Fixed3D Microsoft
Sons Serief,
8.25pt False False 100,20 | |
- The Label control, created by
... - lblBook Properties:
Name: BackColor: Font: Size: Text: |
lblBook Control Microsoft
Sons Serief,
8.25pt 100,23 Book | |
- The Label control, created by
... - lblBookTitle
Properties:
Name: BackColor: Font: Size: Text: |
lblBookTitle Control Microsoft
Sons Serief,
8.25pt 100,23 BookTitle | |
- The Label control, created by
... - lblChapter Properties:
Name: BackColor: Font: Size: Text: |
lblChapter Control Microsoft
Sons Serief,
8.25pt 100,23 Chapter | |
- The Label control, created by
... - lblVerse Properties:
Name: BackColor: Font: Size: Text: |
lblVerse Control Microsoft
Sons Serief,
8.25pt 100,23 Verse | |
- The Label control, created by
... - lblTextData
Properties:
Name: BackColor: Font: Size: Text: |
lblTextData Control Microsoft
Sons Serief,
8.25pt 100,23 TextData | |
- The Label control, created by
... - lblNavigation
Properties:
Name: BackColor: Font: Size: Text: TextAlign: |
lblNavigation White Microsoft
Sons Serief,
8.25pt 95,23 No
Records MiddleCenter | |
- The Button control, created by ...
- btnLoad Properties:
Name: Size: Text: |
btnLoad 75,23 &Load | |
- The Button control, created by ...
- btnUpdate Properties:
Name: Size: Text: |
btnUpdate 75,23 &Update | |
- The Button control, created by ...
- btnNavFirst
Properties:
Name: BackColor: Size: Text: |
btnNavFirst Control 40,23 << | |
- The Button control, created by ...
- btnNavPrev Properties:
Name: BackColor: Size: Text: |
btnNavPrev Control 40,23 < | |
- The Button control, created by ...
- btnNavNext Properties:
Name: BackColor: Size: Text: |
btnNavNext Control 40,23 > | |
- The Button control, created by ...
- btnLast Properties:
Name: BackColor: Size: Text: |
btnLast Control 40,23 >> | | |
Remove the following controls
created...: one Label control -
lblTextData and two Button
controls - btnLoad and
btnUpdate |
|
Modify
the Properties of the following controls
created: Five
TextBox controls, Four Label controls and four Button
controls |
- Modify
the TextBox control,
EditBook
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.Book EditBook Info FixedSigle Microsoft
Sons Serief,
8.25pt True False 88,20 | |
- Modify
the TextBox control,
EditBookTitle
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.BookTitle EditBookTitle Info FixedSigle Microsoft
Sons Serief,
8.25pt True False 88,20 | |
- Modify
the TextBox control,
EditChapter Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.Chapter EditChapter Info FixedSigle Microsoft
Sons Serief,
8.25pt True False 88,20 | |
- Modify
the TextBox control,
EditVerse Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.Verse EditVerse Info FixedSigle Microsoft
Sons Serief,
8.25pt True False 88,20 | |
- Modify
the TextBox control,
EditTextData
Properties:
DataBindings
Text: Name: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
objKJV2002dset
-
BibleTable.TextData EditTextData Info FixedSigle Microsoft
Sons Serief,
8.25pt True True 320,94 | |
- Modify
the Label
control, lblBook
Properties:
Name: BackColor: Font: Size: Text: |
lblBook InactiveCaption Times
New Roman,
9pt 56,16 Book | |
- Modify
the Label
control, lblBookTitle
Properties:
Name: BackColor: Font: Size: Text: |
lblBookTitle InactiveCaption Times
New Roman,
9pt 56,16 BookTitle | |
- Modify
the Label
control, lblChapter
Properties:
Name: BackColor: Font: Size: Text: |
lblChapter InactiveCaption Times
New Roman,
9pt 56,16 Chapter | |
- Modify
the Label
control, lblVerse
Properties:
Name: BackColor: Font: Size: Text: |
lblVerse InactiveCaption Times
New Roman,
9pt 56,16 Verse | |
- Modify
the Label
control, lblNavigation
Properties:
Name: BackColor: Font: Size: Text: TextAlign: |
lblNavigation White Times
New Roman,
8.25pt 80,23 No
Records MiddleCenter | |
- Modify
the Button control,
btnNavFirst
Properties:
Name: BackColor: Size: Text: |
btnNavFirst InactiveCaption 32,23 << | |
- Modify
the Button control,
btnNavPrev
Properties:
Name: BackColor: Size: Text: |
btnNavPrev InactiveCaption 32,23 < | |
- Modify
the Button control,
btnNavNext
Properties:
Name: BackColor: Size: Text: |
btnNavNext InactiveCaption 32,23 > | |
- Modify
the Button control,
btnLast
Properties:
Name: BackColor: Size: Text: |
btnLast InactiveCaption 32,23 >> | | |
| |
3- |
The BookForm.cs design,
Part1 |
|
 |
4- |
From the Toolbox/Windows Form add the
1st List of controls .... Two
PictureBox control, tree
Label controls, two Button controls
and one tabControl Control. |
|
- Add the PictureBox
control - PictureBox1,
PictureBox Properties:
Name: Image: Size
Mode: |
PictureBox1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VCSNet\Pic\Chriistus-th.bmp
- Add the PictureBox
control - PictureBox2,
PictureBox Properties:
Name: Image: Size
Mode: |
PictureBox1 System.Drawing.Bitmap Autosize | |
Bitmap file
added = C:\App-VCSNet\Pic\forum.bmp
- Add the Label
control
- Label2, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label2 Times New Roman,
9.75pt, style=Bold, Italic 120,16 Record
data
boxes TopLeft | |
- Add the Label
control
- Line1, Label
Properties:
Name: BackColor: Font: Size: Text: TextAlign: |
Line1 Desktop Microsoft
Sans Serif,
8.25pt 8,464
TopLeft | |
- Add the Button
control - btnAbout, Button
Properties:
Name: BackColor: Size: Text: |
btnAbout InactiveCaption 48,24 About | |
- Add the Button
control - btnDone, Button
Properties:
Name: BackColor: Size: Text: |
btnDone InactiveCaption 48,24 About | |
- Add the Label
control
- Label1, Label
Properties:
Name: BackColor: Size: Text: |
Label1 InactiveCaption 120,16 Search | |
- Add the TabControl
control
- TabControl1,
TabControl Properties:
Name: Size: TabPages: |
TabControl1 312,184 (Collection) | |
Add 2
pages to this
TabControl, when you click
Collection of TabPages property,
the TabPage Collection Editor dialog box
appears. In this Editor add 2
pages
Member |
BackColor |
Text |
Size |
TabPage1 TabPage2 |
Info Info |
By
word By address |
304,158 304,158 | | | |
5- |
The BookForm.cs design, Part
2 |
|
 |
6- |
From the Toolbox/Windows Form add the
2nd List of controls .... Two Label
controls, one Textbox control, two Button
controls, .one ListView control and two
ImageList controls. |
|
- Add the Label
control
- Label3, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label3 Times New Roman,
8.25pt 168,16 Type in the word to search
for: TopLeft | |
- Add the TextBox
control - TxtWord
Properties:
Name: Autosize: BackColor: BorderStyle: Font: Locked: Multiline: Size: Text: |
TxtWord False Window Fixed3D Microsoft
Sans Serief,
8.25pt False False 168,19 | |
- Add the Button control
- btnSearch Properties:
Name: BackColor: Enabled: Size: Text: |
btnSearch Control False 48,24 Search | |
- Add the Button control
- btnView Properties:
Name: BackColor: Enabled: Size: Text: |
btnView Control False 48,24 View | |
- Add the ImageList control
- ImageList1 Properties:
Name: Images: ImageSize: TransparentColor: |
ImageList1 (Collection) 16,16 Transparent | |
Add one
image to this ImageList: When
you click Collection of Images
property, the Image Collection Editor
dialog box appears. In this Editor dialog
click Add, the Open Dialog box
appears In this dialog, display list of
files stored in the folder c:\App-VCSNet\Pic
In the Filename combo box type
butterfly1 In the Files Type combo
box choose All image ... and then
click Open Automatically, lists of
information display in the Image Collection Editor
dialog box, and then click OK
- Add the ImageList control
- ImageList2 Properties:
Name: Images: ImageSize: TransparentColor: |
ImageList2 (Collection) 16,16 Transparent | |
Add one
image to this ImageList: When
you click Collection of Images
property, the Image Collection Editor
dialog box appears. In this Editor dialog
click Add, the Open Dialog box
appears In the Open dialog,
display list of files stored in the folder
c:\App-VCSNet\Pic In the Filename
combo box type butterfly1 In the Files
Type combo box choose All image
... and then click
Open Automatically, lists of information
display in the Image Collection Editor dialog box, and
then click OK
- Add the RichTextBox
control
- RichTextdata,
RichTextBox Properties:
Name: Size: Visible: |
richTextData 96,32 False |
|
The
RichTextBox control allows the user to enter and
edit text while also providing more advanced
formatting features than the standard TextBox
control
- Add the ListView
control
- Listview1,
ListView Properties:
Name: Font: LargeImageList: Size: SmallImageList: View: |
Listview1 Microsoft Sans
Serief,
8.25pt ImageList2 288,88 ImageList1 Details | |
- Add the Label
control
- lbinfo1, Label
Properties:
Name: Font: Size: Text: TextAlign: |
lbinfo1 Times New Roman,
8.25pt 288,16 . TopLeft | |
| |
7- |
The BookForm.cs design, Part
3 |
|
 |
8- |
From the Toolbox/Windows Form add the
3th List of controls .... Five
Label controls and four ComboBox
controls. |
|
- Add the Label
control
- Label4, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label4 Microsoft Sans Serief,
8.25pt 64,16
TopLeft | |
- Add the Label
control
- Label5, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label5 Microsoft Sans Serief,
8.25pt 64,16
TopLeft | |
- Add the Label
control
- Label6, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label6 Microsoft Sans Serief,
8.25pt 64,16
TopLeft | |
- Add the Label
control
- Label7, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label7 Microsoft Sans Serief,
8.25pt 64,16
TopLeft | |
- Add the Label
control
- Label8, Label
Properties:
Name: Font: Size: Text: TextAlign: |
Label8 Times New Roman,
975 100,16
TopLeft | |
- Add the Combo Box control
- cmbtitle Properties:
Name: DropDownStyle: Size: Sorted: |
cmbtitle DropDown 120,21 False | |
- Add the Combo Box control
- cmbbook Properties:
Name: DropDownStyle: Size: Sorted: |
cmbbook DropDown 120,21 False | |
- Add the Combo Box control
- cmbchapter Properties:
Name: DropDownStyle: Size: Sorted: |
cmbchapter DropDown 120,21 False | |
- Add the Combo Box control
- cmbverse Properties:
Name: DropDownStyle: Size: Sorted: |
cmbverse DropDown 120,21 False | | | | |
The codes corresponding
...
|
|