.


:




:

































 

 

 

 


() .




, , : , /. , . .. , . . , , , . . . ↑ , ↓ - .


25. . .

- , .

 

, (), /. , , , , .

() ;

( , , . - );

( , , , ( ) (.- -, , ) .

 

. . (: , ). : ( ), ( ). . , , .

 


26. .

( ), . 1 1 .

. . : .... , ..D.. .

, , . . (. ): C:\K1\K2\..\f1.doc : , , , . . .

 

:

( 1 )

( )

( , )

( )

,

( )

( , , )

: , . . FAT . , NTFS .


 

27. VB. . . . .

 

Microsoft Visual Basic , , Microsoft.

Visual Studio 2005 . , . Visual Basic 2005 - . , . : , , .. , , . Visual Basic 2005 , . . Visual Basic 2005 , , , . , Visual Basic 2005, . .

, , . :

All Windows Forms ( ) . , ;

Common Controls ( ) ;

Containers () , ;

Menus & Toolbars ( ) , ;

Data () , .

Components () , , , ;

Printing () , ;

Dialogs ( ) : , ;

General () .

 

Visual Basic 2005 . , . .

1. Visual Basic 2005.

2. Create Project Start Page , , New Project File.

3. (. 11) . (Project Types). , 17 . Visual Basic Windows. Windows . (Templates). Windows Application.

4. Name . (. 4.1). , . , , .

5. Location .

6. Create directory for solution , .

7. O.

28. VB. . . .

1. VBA , , .. , , . . :

Private Sub
VBA(Option Base 1, Option Explicit)
(Const PI As Double = 3,1415, Const MS = 20)
(Dim x As String * 10, Dim IJ As Integer)

(Function F(x), F = 2*PI*x, End Function)
Sub My_Pr()
Z = F
MsgBoxotv = &Format(z)
End Sub

2. Visual Basic Dim As . , Variant. Option Explicit , . , Variant, , , .

:

,

. (. -)

,

.

ü :

Ø (sbyte 1, short -2, integer 4, long 8)

Ø (byte 1, ushort 2, uinteger 4, ulong 8)

ü :

Ø (Decimal -16)

Ø C (String 4, Double 8)

ü (chart, string)

ü Boolean, date, object

 

, . VBA .

( ) . . , . , . . ( 1 ) ( ) . -0. .

 


29. VB.

:

(=) . Let ;

, C, . A = B = C , A, B C .

:

(+), (-), (*), (/)

(^). : 2 ^ 3 = 8

(\)

(Mod) ( ).

:

(=);

, , (> <);

(>= <=);

(<>)- : If nVar <> 10 Then;

(Is). , - : If obj1 Is obj2 Then;

(Like). , - : If strEmail Like "*@*.*" Then.

:

(And);

(Or);

(Not);

(Xor) E1 Xor E2 True, E1 = True E2 = True, False;

(Eqv);

(Imp).

 

:

(+) . , . , , , . , (&) ;

(&) . , str = "10" & 20 "1020", "30". (+) , VB "10" 10, , .

 


30. , .

: for..next

For =1 ( ()) to 2() [step 3] ( , 1)

{ }

[ Exit for]

[continue for]

Next

Do..Loop

true ( , , =true , =false. = 0) do while → →loop

true ( , 1) do → →loop while

false ( , =false , =true. =0) do until →→loop

false ( =1) do →→loop until

 


 

31. . . .

. , . .

2 :

( );

.

, , . , . , .

Private|Public Sub ( / )→

End Sub

, () , .

Private|Public Function ( / ) As →

Return →

End Function

, ( / ). , () . .

, , . . . (, ) ( ).

 

32. . .

, , . . . (, ) ( ). : (ByVal) (ByRef).

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





:


: 2016-12-29; !; : 760 |


:

:

.
==> ...

1593 - | 1569 -


© 2015-2024 lektsii.org - -

: 0.038 .