|
The Form design, BookForm.cs
1st TabPage selected of TabControl
control.. |
2nd
TabPage selected of TabControl
control.. |
 |
 |
Create
Visual C# 2010 Forn - BookForm.cs
Classes used in this Form: 1-
DataSet,
PictureBox, Label,
TextBox, Button, TabControl, ListView, ComboBox,
RichTextBox
2- Logical DbConnection, DbDataAdapter, DbCommand
classes
Create the Form
BookForm.cs
Add New Item -
BookForm.cs Form to App_CAKJV10
Project
- On the Projet
menu , click Add New Item ...,
Add New Item - App_CAKJV10 dialog box appears, Select
Windows form Icon,
in the Name box type
BookForm.cs and then click
Add.
|
 |
|
Note:
In the Windows Forms Designer appears the
design form created and in the Properties
Windows displays the corresponding properties
and
The design Form BookForm.cs created, appears the empty window Form
design |
|
The codes file, created
... |
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
namespace
App_CAKJV10
{
public
partial
class
BookForm :
Form
{
public
BookForm()
{
InitializeComponent();
}
private
void BookForm_Load(object
sender,
EventArgs
e)
{
}
}
}
|
|
|
|
1- Database file - KJV2002.mdb
-
c:\App_CAKJV10/App_CAKJV10/Pic\KJV2002.mdb |
|
|
-
Create
the DataSet
Bookdset.xsd
Add New Item -
Bookdset.xsd
Dataset to work_VBNet_10
Project
- On the Projet
menu , click Add New Item ...,
Add New Item - App_CAKJV10 dialog box appears, Select
DataSet Icon,
in the Name box type
Bookdset.xsd and then click
Add.
|
 |
|
|
|
-
DataSet
Bookdset.xsd -
Drag Database items fromServer Explorer.
Data source = c:\App_CAKJV10/App_CAKJV10/Pic\KJV2002.mdb
|
Datatable: book |
|
|
|
- The files -
forum.bmp, Christus-th.bmp and
butterfly1.bmp of the folder -
c:\App_CAKJV10/App_CAKJV10/Pic
- On the Projet
menu , click Add Existing Item ...,
Add Existing Item - App_CAKJV10 dialog box
appears, select the files forum.bmp,
Christus-th.bmp and butterfly1.bmp
of the folder c:\App_CAKJV10/App_CAKJV10/Pic, and then
click Open.
|
|
The BookForm design |
|
 |
|
|
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 ...
1- one
DataSet control, six Label controls,
fiveTextBox controls and four Button
controls
2- Logical DbConnection control,
DbDataAdapter control |
|
- 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_CAKJV10/App_CAKJV10/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_CAKJV10/App_CAKJV10/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_CAKJV10/App_CAKJV10/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_CAKJV10/App_CAKJV10/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
...
|
|