Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.ssau.ru/files/education/metod_2/loganova_visual_foxpro.pdf
Äàòà èçìåíåíèÿ: Tue Dec 9 17:26:37 2014
Äàòà èíäåêñèðîâàíèÿ: Mon Apr 11 02:29:31 2016
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: annular solar eclipse
..

VISUAL FOXPRO ­ .


2003

1


: ..

, 511600 « ». Visual FoxPro 7.0 « ». .

: . , ... ..

2


1 : .
. .dbf. .dbf , 10 . , , 128 . (Name), (Type) (Width ­ , Decimal ­ ), (Index). , , . FOXPRO 10 . , , 1 254 , . , Visual FoxPro 7.0, 1.

1.





Character ()

. ­ 254

3


Numeric () Float () Double ( ) Integer (, ) Data () DataTime ( ) Logical () Memo ( ) c

0 9, (), () , ( ), , ( ),



, , . Visual FoxPro . // :: . .T. ­ , .F. ­ , . , . ­ fpt ( dbf fpt ).

4


( CTRL+Home), . (CTRL+W), , memo Memo. General (, ) , . , , , , , OLE. . Edit()-insert object( ) (, ). , gen Gen, , . memo, , 254 . , ,

Currency () Memo binary

Character binary

5


, ( ), . Fields() Table designer ( ) : Display(), Field validation( ), Map field type to classes( ). : Format(), , Input mask( ), , Caption(), ; : Rule(), , , Message(), , Default value( ), , ; , , . Table() , , Record Validation. Triggers ­ , , . .F., : "Trigger failed". Visual FoxPro . ,

6


Table-Go to Record. : Top- , Bottom , Next- , Previous- , Record #- . Locate ­ , . , :All- , Next+- , Record+- , Rest ; For ( , ) While ( ), . , , ontinue. , Fields, , Index .

.

1. , , mkdir stud, , (, mkdir c:\stud\626\andrei). FoxPro : Set Default to < >. 2. , . (File) (New table) c Stud.dbf, . : Name ­ Num, Type ­ Numeric, Width ­ 6

7


, , Width ­ 25 ( ) 4, Decimal-2

Name ­ Fio, Type ­ Character, Name ­ God, Type ­ Integer Name ­ Dr, Type ­ Data Name ­ Plata, Type ­ Logical Name ­ Sr, Type ­ Float, Width ­

Name ­ Money, Type ­ Currency Name ­ Port, Type ­ General Name ­ Adr, Type ­ Memo 3. : 1000, ­ 1986. 4. , ­ 15. . 5. 4-5 .

, 6. , Table , . 7. , ­ { / / }. 8. , , .

8


2 : .
­ , . , . , , . . . . . .IDX . .CDX . . , . , . , . Visual FoxPro . . Visual FoxPro File() ­ New() ­ Database-New( ).

9


.DBC. , Database( ) ­ Add New, . , . Visual FoxPro : (Primary) . . (Candidate) , . (Regular) . , . ( ), . , . 1:1 «Cadidat» «Primary» («» «» ). 1:n, «Cadidat» «Primary». , , Recular Unique ( ). , , . , . , ,

10


. FoxPro , Window () - Data session ( ). 1:1 Relations (). , . 1:n, 1:1, «1 to many». . . , , , , . , Database-Clean Up, DatabaseReferential Integrity. Rules for Updating, Rules for Deleting, Rules for Inserting Referential Integrity Builder , . : Rules for Updating Cascade ­ ; Restrict ­ , ;

11


Ignore ­ . Rules for Deleting Cascade ­ ; Restrict ­ , ; Ignore ­ . Rules for Inserting ; Restrict ­ , Ignore ­ . , «». ­ . , . .dbf, .fpt, .cdx, , . BEGIN TRANSACTION , ROLLBACK END TRANSACTION. , .. . . ( 5 ). :

12


1. , , END TRANSACTION; 2. END TRANSACTION ; 3. ROLLBACK ; 4. , , , .

.

1. Base.dbc, . Stud.dbf, Num «». 2. Session.dbf, , : , . 3. , . 4. , 1:n

5. 1:n Stud.dbf Session.dbf. . 6. .

13


3 : , .
SQL (Structured Query Language ­ ) (Query). , , , - . SQL . SQL , . SQL , , , . Visual FoxPro . File-New-Query-New-New file. , . 6 : Fields, , , Join ­ , Filter ­ , Order by ­ /, , Group by ­ , ­ SUM(), AVG() .. , SQL

14


HAVING , , , Miscellaneous ­ . Add table. . (View). , Join, Filter , Logical OR AND. : {=, <>,>,<,>=,<=}; Between (namefields, <1>, <2>)- <1> <2>, IN (); LIKE not LIKE, IS null IS NOT NULL. Query, , (Query destination). Browse , , Cursor , , Table .DBF, GRAF , Screen , Report Label .

15


.

« », :

1. , . 2. , . 3. , . 4. , . 5. . ,



6. , 4 .

16


4 : SQL.
­ SQL, . SQL. (Local) Visual FoxPro, (remote) ­ ODBC. SQL : CREATE SQL VIEW [< >] [REMOTE] [CONNECTION< > [SHARE] /CONNECTION< >] [AS < SELECT>] REMOTE ­ SQL. CONNECTION < > - . [SHARE] . CONNECTION< > , DBF , . ODBC. . SELECT (SQL)

17


, . Visual FoxPro (View Designer). ­ Update riteria. , : Update, Delete, Insert. Update criteria Field Name , , , . . . View Parameters, Query- View Parameters, , Select-Where. , , . , Visual FoxPro (Microsoft SQL Server, Oracle .), Visual FoxPro , , , . Remote View ( ). , ODBC (Open database Connectivity ­ ) Connections(). Database ­ New Remote View. View Wizard New View. Select Connection or Data Source : (Available Data sources) (Connection).

18


, ODBC Administrator. Available Data sources View Designer, . , Add Table or View Select View. ODBC Administrator Visual FoxPro. Database- Connection NEW Connection Designer. Select Connection or Data Source , Visual FoxPro ODBC ODBC Select, .

.
1. « ». 1.1. , «». 1.2. , . 1.3. . 2. .

2.1. , . 2.2. , .

19


3.

.

5 : .
­ . , Visual FoxPro, . , , , , , , , .. : (). , Visual FoxPro, , Pad- (, File, Edit ..). ­ Popup ­ , BAR Pad . Popup ­ , . Visual FoxPro . File-New-Menu Create menu < > : Menu ­ Bar- Shortcut ­ Popup-. Menu , Menu.

20


Menu-Quick Menu , Visual FoxPro. . Quick Menu , . . : Prompt ­ . . «\<», , . `\-`. Result ­ . 4 : Command- , , Pad name Bar# ­ Visual FoxPro, Submenu ­ , Create, Procedure ­ , Edit. Options ­ , , Prompt Options Key label Key text, , Skip For Prompt Options . Message , . Delete Insert Item Menu Designer. ,

21


. Preview. .mnx, .mnt. MODIFY MENU < .mnx > File-Open. , DO < >. Menu-Generate , .mpr. Set Sysmenu to Default.

.

1. , Visual FoxPro, Utilities, : Calendar ( , ­ MST_Diary), Calculator (_MST_Calcu). 2. File Open DataBase Open Table Close Edit Append Delete Recall Browse Append Blank Delete Recall Browse last Open DataBase < > Use < > Close all :

22


Query Exit

Do < .qpr> Set Sysmenu to default

, , Edit ( Used, .., ). , .

6 : .
Visual FoxPro . ­ , ( ). Visual FoxPro , , . .scx .sct. ­ . Visual FoxPro. / .

23


Visual FoxPro. Wizard Form ( ), Form Designer ( ). File-New-Form-Wizard Tools-Wizards-Form. , , (Form-Wizard ) (One to Many Form-Wizard). .

Form Designer ( ) File-New-Form-New file. , , (Form-Wizard ) (One to Many Form-Wizard). Form Designer. , .. . Data Environment View-Data Environment Data Environment . /, Data Environment-Add Add . , Properties, : All ­ , , , , ; Data ­ ; Layout ­ , ; Methods ­ , ; Other ­ , . ­ Layout Toolbar ( , Format), Form Controls Toolbar (

24


), Color Palette Toolbar( ), View. . Form Controls Toolbar , .

Select Objects View Classes Label Text Box Edit Box CommandButton OptionGroup CheckBox Grid ComboBox ListBox Sprinner Line Shape Container

Memo-

25


Image CommandGroup

General OLE- Internet

Timer PageFrame OLEBouldControl OLEContainerControl Separator HyperLink BuilderLock ButtonLock

, Select Object, . . . , Button Lock . .

26


.

1. , , . 2. , ( ­ go top, ­ go bottom, ­ skip 1, ­ skip -1), ­ delete, ­ append blank, ­ release thisform. 3. , .

7 : FormSet.
, , FormSet. . , , , . , FormSet, (Data Session). , Form-

27


Create Form Set. , Form1. Form-Add Form. THISFORMSET.FORMS< >./ THISFORMSET.FORMS< >./. : Hide ­ , Show ­ . ­ (line) (Box), ­ Clear, Release. . New Property, New Method Form.

.

1. ­ , . , , . . . , , , , . , . . 2. « » ­ , ..,

28


.F. . Grid, . , , . MessageBox( ).

8 : Visual FoxPro.
Visual FoxPro , , , . , . Visual FoxPro , , , . ­ . (load), (Unload), (init), (Click), (Got Focus), (Lost Focus) . RightClick .

29


. , Init Load, : Define popup < > in window < > Define Bar < > of < > prompt " " On selection popup < > do < , >.PRG , , : Define popup m in window form1 Define Bar 1 of m prompt "A" Define Bar 2 of m prompt "B" On selection popup m do g.PRG , , : Move popup < > TO < , , > ACTIVATE POPUP < > , move popup m to 6,35 Activate popup m , . , g.prg: Procedure g If bar()=1 Messagebox("1") Else

30


Messagebox("2") Endif endproc

Valid . .T., , . , : If this.value>< > Return .T. Else Retun.F. Endif GotFocus , LostFocus . , : THIS.FORECOLOR=RGB(0,0,0) THIS.BACKCOLOR= RGB(255,0,0) : THIS.FORECOLOR=RGB(0,0,0) THIS.BACKCOLOR= RGB(255,255,255) Message . Programmatic Change Value , , Object.value=.

31


.

1. , : . 2. . 3. , . 4. .

9 : .
, , . , . Visual FoxPro Report Wizard ( ) Report Designer ( ). Tools-Wizard-report File-New-report- Wizard. , : One-to-many report wizard ( ) Report Wizard (

32


). . File-New-Report-New CREATE REPORT < > . Report . Modify Report < >. ReportQuick Report. . : ,

· Title ­ ­ ; · ; Page Header ­

· Group Header ­ ; · · · ; · Detail ­ ; Group Footer ­ ; Page Footer ­

Summary ­ .

, : , , , . Visual FoxPro . Title Summary Report-Title/Summary.

33


Title Band Summary band. , , : · · · · ; ; , ; .

.frx, .frm, .frt. , , , , View-Data Environment. Add. Add Table or View , , , . Data Environment . ViewReport Controls Toolbar. , . , Detail. Data Environment. Report Expression . , , Format. , . , . Calculations Report Expression, Calculate Field ­ .

34


Report-Data Grouping. : · ;

· ; · ; · .

, , , , . ReportVariables , . Calculate , . Reset at. , Release after report. , . File-Page Setup . , . ­ , . , .

35


Label Wizard, Label Designer ­ .

.

1. , ; . 2. , . 2.1. . 2.2. , , . 3. .

36


10 : Visual FoxPro.
, , , , , , , . , . ( .pjx), . FileNew-Project-New Create Create project < >. Project Manager ( ) . : Data ­ , , ; Documents ­ , ; Classes ­ ; Code ­ (.prg) ; Other ­ , , ; All ­ . . , . ( ) . Project,

37


. Project information Project- Project info. , , , , .ico . Files Project information , . , . Project Manager Add. , , . , Project-Set main. .

OPEN DATABASE stud CLEAR DO stud.mpr READ EVENTS CLOSE DATABASE

New. Modify . Remove ­ . , , Project-Clean Up Project. Browse ­ .

38


Visual FoxPro NoprojectHook, ProjectHook: Create/Modify project [<>] [in screen] [nowait] [save] [noshow] [NoprojectHook] projectHook. projectHook. . .app. , . 2 , . Build Project Manager. Build Options, : Rebuild Project ­ ; Build Application ­ .app; Build Executable ­ .exe; Build COM DLL ­ .dll; : Recompile All Files ­ ; ,

39


Display Errors ­ , ; , Project-Errors; Run after Build ­ , ; Regenerate Component Ids ­ ; Build Executable Build COM DLL. .app- Do < .app>. .exe- Visual FoxPro. .exe . , Setup Wizard. , , . ToolsWizards-Setup .

.

1. , : , , , , . , . . : Report form < >.

40


2. 3.

. .

11 : Visual FoxPro.
Visual FoxPro , , , . New-Program File. Modify command .prg, . , : Do < >. .fxp. FoxPro Help. . List [< >] [fields < >] [for ] [while ] off

41


[to printer [prompt]/ to file < >] [noconcole] [nooptimize] , , For While, . OFF ­ . , , List set heading off. to printer to file < > . noconcole . nooptimize Rushmore- List, . Display , List. , . . OPEN DATABASE < > - . USE < >- . :

LOCATE [] [WHILE] [FOR ] ­ , , FOR . LOCATE CONTINUE. SEEK (<> [,< >][,< >] [< >]) ­ <> , .T. SEEK FIND , . FIND < / >

42


SORT <> [ASCENDING/DESCENDING]

TO

<

>

ON <> [/A][/C][/D] [,<> [/A][/C][/D]] [WHILE ] [FOR < l >] [FIELDS < >] ­ , . [/A][/C][/D] ­ , , . . SET FILTER to - , . . : IF.....ENDIF, DO WHILE .....ENDDO, FOR ......ENDFOR, DO CASE.....ENDCASE.

SCAN [] [FOR-] [WHILE-] [LOOP][EXIT] <> ENDSCAN­ , , <>. LOOP- , , EXIT- , ENDSCAN ( ENDDO, ENDFOR). , , . , Visual FoxPro ­ , . .. , , , -.

43


- ­ (Objects), ­ .. , . , , .. , , : Messagebox (« », <>, « »). <> - , . (Properties), , . . , Show ­ , Hide ­ . ­ : · <>.<>[LPARAMETERS< >] · <>.<>=<> · >[(<>)]

<>.<

· <>.<>.<>/<>

44


.

1. , : · · · · · · ; ; ; ; Select; .

2. , , .

12 : , FoxPro.
,

45


. .idx INDEX ON <> TO < > [FOR ] [DESCENDING] [UNIQUE] [ADDITIVE] [COMPACT] <> , , . DESCENDING ­ <> ( - ). UNIQUE <>. ADDITIVE ­ , . COMPACT ­ , , , . COPY INDEXES < .idx>/ ALL .idx>]. [TO <

TO <> , . , .. , . .cdx : INDEX ON <> TO TAG < > [OF < .cdx>] [FOR ] [DESCENDING] [UNIQUE] [ADDITIVE]. : DELETE TAG < 1> [OF <.cdx1>][,... [ < N> [OF <.cdxN>]]]

46


DELETE TAG ALL [OF <.cdx>]. :

< AGAIN . . >

USE < > IN < > INDEX .idx, .cdx> [AGAIN][NOUPDATE], , NOUPDATE ­ .idx SET INDEX TO < [ADDITIVE].

: SET ORDER TO< .idx>/< .idx>/ TAG< > [DESCENDING] [ADDITIVE] ­ . : USE < > [ORDER /<.idx>/ TAG <> [OF <.cdx>] [ASCENDING/ DESCENDING]] SET ORDER TO , , , , . 1:1 , SET RELATION TO key INTO <1>[,........ [,keyN ]][ADDITIVE] INTO

ADDITIVE . , . , , ,

47


, . SELECT < /> A J 1-10. . . USE < > IN < > ALIAS <>. 1:N 1:1, SET SKIP TO < >, , 1:N.

.

1. , « », 1.1. 1:1 . 1.2. 1:N , .

48


1.3. M:N , ( ). 1.4. 1:N N:1 , , , (, ), .

13 : .
­ , . (Class Designer). , ( .vcx, .vct). , , . Visual FoxPro 7.0. , . , Class, , Base Class ­ , ClassLibrary ­ ,

49


ParentClass ­ , , , , . , , , , , , . , , , . . Visual FoxPro , , , . Timer, . Visual FoxPro 7.0 . . , , Other Properties. . , , , , . , , , :

50


DEFINE < > AS < > < > ENDFINE File-New-Class CREATE CLASS. New Class : Class Name ­ ; Based On ­ , ; Store In ­ . Class Designer. , Form Controls ( Add ). , Controls Options, Visual class libraries, Add. View Classes Form Controls. Component Gallery ( ) ­ Visual FoxPro 7.0 ­ , , , Web , , .. Component Gallery ToolsComponent Gallery. Visual FoxPro, . Component Gallery Default. Class by Type ­ , , Building Apps ­

51


, Fast Form ­ . Modify . , Form Controls. Class Browser View in Browser. , ­ . , Visual FoxPro.

.

1. , ­ , , , . . . 2. - , ­ . . 3. , ( ­ Simple Navigation Buttons),

52


, .

14 : Internet Visual FoxPro 7.0.
Web , - , Visual FoxPro 7.0. Web . (, ODBC Visual FoxPro OLE . , Visual FoxPro Web- Visual FoxPro ODBC. Visual FoxPro Web-, Web HTML-. Visual FoxPro : · WWW Search Page Wizard ­ Web HTML, Visual FoxPro. · Web Publishing Wizard ­ Visual FoxPro Web-.

53


Active Document. Visual FoxPro 7.0 ­ , Internet Explorer. Web- Tools-Wizard- Web Publishing. HTML-. HTML- , Visual FoxPro HTML-. HTML- , Visual FoxPro Component Gallery , HTML. Tools ­ Component Gallery, Visual FoxPro Catalog-Foundation Classes-Internet. HTML-: · · · _dbf2html-DBF ­ HTML; _frx2html-FRX ­ HTML; _scx2html-SCX ­ HTML. , SCX-HTML HTML- ,

. Soure file Output options .

, , : ThisForm._csx2html1.nGenOutput=2 ThisForm._csx2html1.GenHTML()

54


nGenOutput _scx2html.

0 1 2 3 4 5

FoxPro Internet- Save As _oHTML

_oHTML -

HTML- GenHTML(), File ­ Save As HTML. Internet-. Active Document Visual FoxPro, .app . Active Document , , , _activdoc, , , Web-. Set main Active Document. OLE- , , _activdoc. , Active Document,

55


, .

.

1. HTML- , , , . 2. HTML- Component Gallery.

56


1. 2. 3. 4. : , , / .. . ­ .: , 2002. ­ 304.: . .. Visual FoxPro 5.0. - ­ .:-, 1997-320. .., .., .. Visual FoxPro 6 ­ .: « », 1999.-784.: . .. FoxPro 2.0. .- .: , .: "", 1995.-352 .: . .., .. 91 Visual FoxPro 7.0. ­ .: +, .: BookStar, 2002. ­ 400 .

5.

57