ITYourself! - компьютерная документация, книги, мануалы, it-тематика

??????? ?? Visual Basic - 1.5. ???????? ??????????? ?????.

E-mail Печать PDF
Рейтинг пользователей: / 984
ХудшийЛучший 
Индекс материала
??????? ?? Visual Basic
1.2. ???????????? ? ?????????? VB
1.3. ?????? VB.
1.4. ??????????????? ????? ?????????? (IDE - Integrated Development Environment)
1.5. ???????? ??????????? ?????.
2. ???? ??????. ?????????? ? ?????????, ?? ??????? ?????????. ???????.
2.2. ?????????? ? ?????????, ?? ??????? ?????????.
2.3. ?????????? ???????? ? ?????? ? ????.
3. ???????? ????
3.1. ???????? ???????????? ????
3.2. ???????? ??????????-?????????? ????
5. ?????????? ?????????? Drag&Drop ?????????? VB
5.1. ??????? Drag&Drop
5.2. ??????? Drag&Drop
5.3. ?????????????? ??????????????
5.4. ?????????????? ? ?????????????? OLE
5.5. ?????????????? ?????????????? ? ?????????????? OLE
5.5. ??????????????? ?????????????? ? ?????????????? OLE
6. ?????? ? ???????? ? Visual Basic.
6.1.1. ?????????? ? ????? ???????.
6.1.2. ?????????? ? ????? ???????.
6.1.3.?????????? ? ????? ???????.
6.1.4.?????????? ? ????????????? ????????.
6.1.5. ???????? ??????? ??????.
6.2. ??????????????? ?????? - ????????? ?????? Splitter.
7. ?????????? OLE
7.1. ??????? ?????????? OLE Container
7.2. ??????? OLE ??? ???????? ??????????
7.3. OLE Automation
7.4. ???????? ??????? OLE
7.5. ????????????? ??????? OLE
7.6. ?????? ? ????????? Word
8. ???????? ????????? ?????????? Active X.
???????? ????????? ?????????? ActiveX
???????? ????????? ?????????? Active X ?? ??????? ZigZag.
9. ????????????? ??????? Windows API ? VB.
API-??????
10. ???????? ??????? ? Visual Basic.
10.2. ????????? ????????? ?????????? (????? ????????????????? ???????).
10.3. ????? ????????????? (???????) ???????.
10.4. ????? ?????????????.
10.5. ????????????? FSO (File System Object).
11. ????????????? ???????? ?????????? WinSock Control ??? ???????? ??????? ??????????.
12. ?????? ? ????? ?????? ?? VB ? ??????? ADO.
12.2. ?????? ?????????? ??????? - ADO Data Control.
12.3. ????????? ? ??????? ???????? ??????????.
12.4. ????????????? Data Grid Control.
12.5. ?????? ? ????? ?????? ????? ??????? ADODB.
13. ????????
Все страницы

5. ???????? ??????????? ?????.

5.1. ??????? VB.

??????? VB ??????? ?? ????????? ???? (??? ????????, ??? ? ?????????), ????, ??????????? ???????? (??????, ?????????????, ? ??.).

? Rem ??????? ? ???, ??? ??? ??????? ?? ????? ?????? - ???????????.

Rem ??? ???????????

A = 0 ??? ???? ???????????

 

5.2. ??????????.

?????????? ?????????? ?????????????? ????????? ???????:

<???????????? ?????????> <??? ??????????> As <???>

<???????????? ?????????> ::= Dim | Private | Public | Static

<???> ::= Integer | Long | Single | Double | Currency | String | Byte | Boolean | Date | Object | Variant

???????? ????????? ? ????? ?????? ????????? ????????? ??????

?????? ?????????? ?????????? ????????? ????????.

??????? ?????????? ??????????:

Dim aaa As Integer

Public bbb As Date

Static ccc As Variant

 

?????????????? (?????) ?????????? ? VB ?????? ??????????????? ??????? ?????? ????:

1. ??? ?????? ?????????? ? ?????

2. ? ?????????? ????? ????? ????????? ?????, ?????, ???? ?????????????

3. ?????? ???????????? ? ????? ??????, ., :, ; ? ??.

4. ??? ?????? ???? ????????? ? ???????? ?? ?????????

5. ????? ?? 255 ????????

6. ??? ?? ?????? ????????? ? ????????? ???????

7. ??? ?????????? ?? ??????? ?? ???????? - Name = nAmE = name

8. ??? ?????????? ?????? ???? ????????????? ? ????????.

 

5.3. ???????????????? ???? (User Defined Types).

<???????????? ?????????> Type <??? ????>

<??? ????> As <???>

. . .

End Type

?????? ? ????? ?? ????? ?????????? ????????????????? ???? ?????????????? ????? ?????.

?????? ?????????? ????????????????? ???? ??????:

Public Type MyType

X As Long

Y As Byte

End Type

Dim Aaa As MyType

Aaa.X = 4.0

Aaa.Y = 245

 

5.4. ?????????.

[ Public | Private ] Const <??? ?????????> [As <???>] = <????????>

?????????? ? VB ????????? ?????? ?????????? ? vb. ????????? ????? ??????? vbCrLf, vbSizeWE...

?????? ?????????? ????????:

Public Const myConst As Integer = 255

 

5.5. ???????.

?????? - ?????? ?????????? ?????? ????, ???????????? ????? ??????.

?????? ???????? ?? ????????? ?????????? ? 0. ???????? ?????? ?? ????????? ????? ??? ????? ?????? ????? ?????????? ????????? (? ?????? ??????!):

Option Base <?????>

<???????????? ?????????> <???> ( [<??????>] ) As <???>

<??????> ::= <?????> [To <?????>]

Dim iInt(30) As Integer

Dim iInt (1 To 30) As Integer

 

5.6. ?????????????? ?????????.

+, -, *, / - ??? ??????

\ - ????????????? ??????? (??????? ?? ???????)

mod - ??????? ?? ???????

^ - ?????????? ? ???????

5.7. ???????? ?????????? ?????.

??? ?????????? ????? ???????????? ?????? &, ???? ????? ???????????? +, ?? & ????????.

5.8. ?????????? ????? ?????????? ????????? (????????? ?????????).


If <???????> Then

???? ?

[ Else

???? ?

]

End If

 

 

 

 

 

If <???????1> Then

???? ?

ElseIf <???????2> Then

???? ?

ElseIf <???????3> Then

???? ?

. . .

Else

???? ?????

End If


Select Case <?????????>

Case <????????1>

???? 1

Case <????????2>

???? 2

. . .

Case Else

???? ?????

End Select

???????? ?????????? ???????? ???? Case Is < 0, Case Is>2+bbb, Case 1,2,3, Case 1 To 3 ? ??.

?????????? ?????????:

And - ?

Or - ???

XOr - ????. ???

Not - ??

?????????? ?????????: TRUE, FALSE

????????? ?????????: <,>,<>,>=,<=

 

5.9. ????????? ?????.

5.9?. ???? ? ????????.

? ????????????:

Do While <???????>

???? ??????? ???????, ??????????? ???? ?????

Loop

???? ?????????? ????????? ???? ????? ? ?????, ??? ????? Do While ???????????? ???????? Exit Do.

 

Do Until <???????>

???? ??????? ?????, ??????????? ???? ?????

Loop

 

? ????????????:

Do

???? ????? ??????????? 1 ??? + ???? ??????? ???????

Loop While <???????>

 

Do

???? ????? ??????????? 1 ??? + ???? ??????? ?????

Loop Until <???????>

 

5.9?. ???? ?? ?????????.

For <??? ??????????> = <????????1> To <????????2> [ Step <???> ]

???? ????? ??????????? ??? ?????????? ?????????? ??

???????? 1 ?? ???????? 2 ? ???????? ????? (??? ? ?????

1 ?? ?????????). ??? ????? ???? <0 ??? ???? ???????. ????? ?? ????? - ???????? Exit For

Next <??? ??????????>

For i=1 to 30 Step 2

Next i

5.10. ??????????? ???????? ????????.

?????:

GoTo ?????

 

5.11. ????????? ? ???????.

????????? (?????? ?? ??????????) ??????????? ????????? ????????:

<Public|Private|Static> Sub <??? ?????????> ( <?????????> )

???? ?????????

End Sub

???????? ????? Public|Private|Static ?????????? ??????? ????????? ? ??? ?????????. Public - ????????? ?????????? ??? ????? ???????. Private - ????????? ??????????? ?????? ?????? ?????. Static - ??? ?????????? ???? ????????? ???????????. ?? ???????? ?? ???????? ????? ?????? ?? ?????????.

??? ?????????? ?????? ?? ????????? ???????????? ???????? Exit Sub.

??????? ????????? ? ???? ????????? ????? ????????? ???????:

[<??? ?????>.]<??? ?????????> <???????? ???-??1>[,<???????? ???-??2> ...]

 

??????? (?????????? ?????-???? ????????) ??????????? ??????????:

<Public|Private|Static> Function <??? ???????> (<?????????>) As <??? ????????????? ????????>

???? ???????

??? ??????? = ...

End Function

????????? ????? - Exit Function.

??????? ???????? ??????? ? ???? ??????? - ???????????? ????? ??????? ???????? ?????????? ????????????.

????? ???????:

[<??? ?????>.]<??? ???????> ( <???????? ???-??1>[,<???????? ???-??2> ...] )

 

????????? ? ??????? ???? ????????? ????? ???????????? ??? ?? ??????, ??? ? ?? ????????. ??? ???????????? ? ???????? ?????????? ??????? ??? ????????? ???????????? ???????? ???? ByVal ? ByRef ????? ?????? ?????????. ?? ????????? ??? ????????? ?????????? ?? ??????.

?? ????????: ???????? ?????????? ? ?????????. ??? ???????? ??????????? ??? ??? ??????. ???????? ?? ??????????.

?? ??????: ?????? ?????????? ????? ??? ????????? ? ?????????. ???????? ??????????.

??? ??????? (ByVal sStr As String, ByRef iInt As Integer)



 

???????????

??????????




????????

Внимание!!! Файл sape.php не обнаружен. Проверьте правильность установки кода Sape.


C???????? ?????????