.


:




:

































 

 

 

 





, , , . , . , .

. , , . , , .

( Project 1 ), .

:

1. File | New, New Items.

2. Projects.

3. .

4. Select Directory ,

. , . . , , , , . , . .

4.4.3

( ) , , .

:

1. Project | Add To Repository, , . 4.3.

2. Title .

3. Description .

4. Page , .

5. Author .

6. Browse, , .


7. , .

 

. 4.3. .

:

1. , , .

2. Tools | Repository.

3. Project Templates ( Form Templates) Add, Save Project Template ( Save Form Template).

4. Title .

5. Description .

6. Page Projects ( Forms), .

7. Author .

8. Browse, , .

9. , .

. , , , .

:

1. File | New, New Items.

2. .

3. .

4. View Details. Description.

4.4.4 ,

File | New Application. , C++Builder . , , , .

:

1. Tools | Repository, Object Repository.

2. Projects Pages.

3. , , Objects.

4. New Project.

5. OK .

File | New Form ( ). , C++Builder . , , , .

:

1. Tools | Repository, Object Repository.

2. Forms Pages.

3. , , Objects.

4. New Form.

5. OK .

( ) , .

:

1. Tools | Repository, Object Repository.

2. Forms Pages.

3. , , Objects.

4. Main Form.

5. OK .

4.5

(Unit), . : .h ..

. , , ; .

C++Builder :

1. File | New Application .

2. File | New Form ( IS1 ) .

3. File | New Unit .

4. File | Open Project ( 1 1 ) .

5. File | Open ( 1^1 ) . .. Directories/Conditionals Options | Project.

6. Project | Add to Project ( .| ) .

:

1.

, View | Units ( IQH ). , View | New Edit Window.

2. , .

3. , Microsoft Windows.

Enter.

, C++Builder Save As, ( , Uniti). , C++Builder Save As, ( , Project1).

:

1. Alt+F4.

2. File | Close.

3. , .

 
 

C++Builder . , Unit1.h . , TButton Button 1, OnClick - ButtonlClick (. 4.4).

. 4.4. C++Biiilder Unit1.h.

AIt+FlO. :

Swap Cpp/Hdr Files Unit.cpp/Unit.h.

Close Page .

Open File At Cursor , .

New Edit Window .

Topic Search - , . , "Help Topic Does Not Exist".

Toggle Breakpoint , . , View | Breakpoints Breakpoint list .

Run to Cursor , . Run | Run To Cursor. , , ,

Run | Step Over Run | Trace Into

Go to Address (. View CPU).

Inspect . , , . , Local symbols Symbol info Pascal Options | Project.

Evaluate/Modify , . Run | Evaluate/Modify.

Add Watch at Cursor , , . Watch List. Run | Add Watch.

Read Only " ", - . .

Message View , .

View CPU - .

Properties .

4.6

C++Builder 32- VCL (Visual Component Library), 100 . , .

Windows Windows 95 ( , ), , . , , 5.

C++Builder - () . C++Builder , OLE (OCX) . , , .

C++Builder , . , , , , . 6. , :

;

, ;

.

. , . , .

4.6.1

Standard

14 Windows.

4.6.1.1 TMainlVlenu

. " ".

Items, . AutoMerge Merge Unmerge .

4.6.1.2 TPopUpMenu

. , PopUpMenu, . " ".

, , , true AutoPopup. . , .

4.6.1.3 TLabel

, . .

Caption. Alignment . , true AutoSize. , true WordWrap. true Transparent , .

4.6.1.4 TEdit

. , Text.

TEdit TCustomEdit, , .

4.6.1.5

. , Lines. .

TMemo TCustomMemo, , .

4.6.1.6 TButton

. .

. , true Default, OnClick , Enter . , true Cancel, OnClick , Escape .

TButton TButtonControl.

4.6.1.7 TCheckBox

- , .

"check" ( ), "uncheck" - Checked OnClick. Caption. ( ) true AllowGrayed. State .

TCheckBox TButtonControl.

4.6.1.8 TRadioButton

, .

- :

( ), . - Checked OnClick.

- . , . , - , . - , , (TForm, TGroupBox TPanel).

TRadioButton TButtonControl.

4.6.1.9 TListBox

, .

, . Items, , , - Itemlndex.

Items. , , Add, Append, Delete Insert Items, :

ListBoxl->Items->Add(" ");

true Sorted .

TListBox TCustomListBox, , .

4.6.1.10 TComboBox

.

Text . , , Items, , , - Itemlndex, - SelText. SelStart SelLength , .

, , Add, Append, Delete Insert Items, :

ComboBoxl->Items->Insert(0, " ");

true Sorted . TComboBox Style.

TComboBox TCustomComboBox, , .

4.6.1.11 TScrollBar

, , , .

OnScroll. , ( ), LargeChange. , ( ) , SmallChange

Min . , Position. SetPcirums Min, Position .

4.6.1.12 TGroup

, . Windows.

4.6.1.13 TRadioGroup

, -.

- "" . . TRadioGroup Items. Items . Itemlndex , - . , Columns.

4.6.1.14 TPanel

, . TPanel .

TPanel TCustomPanel, , .

4.6.2 Win95

Win95

12 Windows 95.

4.6.2.1 TTabControl

- . Tabs

. . 4.5 . , true MultiLine, .

. 4.5. .

false Enabled .

4.6.2.2 TPageControl

, , .

, New Page . : , ActivePage, Next Page Previous Page . Pagelndex . false Tab Visible .

. 4.6. .

. 4.6 . TTabSheet. , . true MultiLine, .

() - , , . Windows 95.

 
 

Items TTreeNodes, . (. 4.7) . , ( ). , -. , . ShowButtons ( "+", -, "-" ) : .

. 4.7. TTreeView.

Indent. , stText

SortType. true Visible - , .

Items ->TTreeNode: AddChildFirst, AddChild, AddChildObjectFirst, AddChildObject, AddFirst, Add, AddObjectFirst,AddObject.Insert,InsertObject.

4.6.2.4 TListView

() . ViewStyle : , , , .

Items , , . .

Columns .

. , vsReport ViewStyle, true ShowColumnHeaders. true ColumnClick : , OnColumnClick. OnEdiling OnEcUtecl , .

Largelmages (Smalllmages) vslcon (vsSmallIcon) ViewStyle. AutoArrange IconOptions Arrangement, WrapText , . . 4.8 , TImageList, Largelmages.

. 4.8. .

4.6.2.5 TImageList

K *k, 0 -1. , k*n. . TImageList , , .

. 4.9. .

(. 4.9) ImageList Editor .

TImageList TCustomImageList, , .

4.6.2.6 THeaderControl

, . , Sections, , , TListBox. (. 4.10) .


. 4.10. .

(. 4.11). . , , OnSectionResize, .


. 4.11. .

4.6.2.7 TRichEdit

RTF (Rich Text Format), . , , Microsoft Word.

. 4.12. RTF .

( . 4.12) Onctivate, OVER VIEW.RTF RichEditI . .

TRichEdit TCustomRichEdit, , .

4.6.2.8 TStatusBar

( ) , .

 
 

Panels. -, 0. (. 4.13) . SimplePanel (- - ).

. 4.13. .

( . 4.14) OnMoiiseMovc', Panels->Item[l] StatusBarl . .

. 4.14. .

Windows.

4.6.2.9 TTrackBar

( ).

Min , Position . Frequency. , ( ) PageUp PageDown, PageSize. , , LineSize.

, TickStyle TickMarks. SelStart SelEnd .

4.6.2.10 TProgressBar

 
 

, . , .

Min . Step Position , .

C++Builder , - ""

=> File | Open Project

. => \...\CBuilder\Examples\Apps\Wpm. => Wpm Open.

=> Run | Run .

WPMMAIN.CPP . , , . (. 4.15) .

. 4.15. .

4.6.2.11 TUpDown

. () (). , , Position.

, Associate. , Position . Associate , Position .

4.6.2.12 THotKey

(shortcut) . "" , (Ctrl, Alt Shift) , F1,..F12.

, HotKey, Shortcut . , HotKey Modifiers, - InvalidKeys. , .

4.6.3

Additional


9 , Borland C++Builder.

4.6.3.1 TBitBtn

. .

, . , C++Buider , . (, "", "", "" ..) .

bmp (. 4.16)

Glyph. Kind , : , Cancel. Helo .

. 4.16. bmp.

4.6.3.2 TSpeed Button

, (TPanel) .

(, "", "", "" ..) . . (. 4.16) Glyph. .

. , , (, , ..). EditMask . (. 4.17)

.

. 4.17. .

TMaskEdit TCustomMaskEdit.

.

, , TDrawGrid, .

, , Objects, . Cols. Rows . Cells, .

4.6.3.5 TDrawGrid

. RowCount ColCount .

Options (, ) (, Tab). GridLineWidth, ScrollBars. FixedCols FixedRows , FixedColor .

true DefauItDrawing , , . false DefauItDrawing OnDrawCell "". DefaultColWidths DefaultRowHeights , . ColWidth RowHeight .

CellRect. MouseToCell , . Selection.

, TopRow. , , LeftCol. VisibleColCount VisibleRowCount .

4.6.3.6 HTImage

( , ).

(. 4.16)

Picture. , ,

true AutoSize. , true Stretch.

LoadFromFile SaveToFile Picture :

Image->Picture->LoadFromFile("< >");

Image->Picture->SaveToFile("< >");

4.6.3.7 TShape

- , ( ).

Shape, - Brush Color Style. .

4.6.3.8 TBevel

, , , .

Shape, Style , . , , true Align.

4.6.3.9 TScrollBox

, , .

. , , , . , .

() . , . , , TButton TCheckBox.

4.6.4

Data Access ,

, .

8 (datasets) - , , , .

- 32- BDE (Borland Database Engine).

4.6.4.1 TDataSource

, . , .

, . , , .

TDataSource master-detail .

false AutoEdit . DataSet , (, ) .

4.6.4.2 ble

BDE TDataSource, , , , TDBGrid.

, (live data) : .

Active , . DatabaseName , TableName - .

true ReadOnly, . true Exclusive, , .

4.6.4.3 TQuery

TTable, TQuery ( ) TDataSource, .

SQL (Structured Query Language), TQuery . , SQL: SELECT - ;

INSERT - ; UPDATE - ;

DELETE - . , 5.

C++Builder BDE ( SQL ), (result set) - .

Active , , SQL . DatabaseName .

Params , . ,

SQL.

4.6.4.4 TStoredProc

, . , . , . , , .

DatabaseName , , StoredProcName - .

TQuery, Params , . , . , Params.

: - . - Prepare

( ) Open ( ).

4.6.4.5 TDatabase

, / . TDatabase , SQL .

OnLogin, , , .

4.6.4.6 TSession

. C++Builder ( Session, ) , .

TSession , Paradox .

, Paradox , - . , (, ), .

, , .

4.6.4.7 TBatchMove

. , , , . :

:

;

.

Source Destination , . (batAppend, batUpdate, batAppendUpdate, batCopy batDelete) Mode Execute, . ProblemTableName BDE, , .

, , TTable.

4.6.4.8 TUpdateSQL

(cached updates) Delphi " ", . SQL . , , .

UpdateObject .

ModifySQL SQL UPDATE, , . InsertSQL INSERT, , . DeleteSQL DELETE, , . - . "OLD_" , , . WHERE SQL.

Apply SQL, , OnUpdateRecord. SetParams ( ) ExecSQL ( SQL).

4.6.5

Data Controls .

12 , .

4.6.5.1 TDBGrid

, . TDBNavigator .

TDBGrid TDataSource, DataSource. Columns - . (. 4.18) Columns Editor .

. 4.18. .

Options (, ) (, Tab). TitleFont , . Fields , , FieldCount - , SelectedField - , .

true ReadOnly , false , . Esc . , , .

4.6.5.2 TDBNavigator

TDBNavigator .

, .

(. 4.19), , . , "+" .

-

. 4.19. TDBGrid.

TDBNavigator TDataSource, DataSource.

4.6.5.3 TDBText

, TLabel, - ,

TDBText , DataSource. DataField , .

Alignment . , true AutoSize. , true Wordwrap. true





:


: 2015-10-01; !; : 466 |


:

:

, .
==> ...

1753 - | 1568 -


© 2015-2024 lektsii.org - -

: 0.324 .