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

??????? ?? Visual Basic - 5.5. ??????????????? ?????????????? ? ?????????????? OLE

E-mail Печать PDF
Рейтинг пользователей: / 871
ХудшийЛучший 
Индекс материала
??????? ?? 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. ??????????????? ?????????????? ? ?????????????? OLE

???? ??????? ??????? OLE-?????????????? ?????????? ?????-???? ??????? ?????????????????, ?? ?????????????? ???????? ??????? ?????????????????. ??? ????? ?????????? ? ??? ??????, ???? ?? ????????? ? ?????????? ??????????, ??????? ?? ???????????? ?????????????? OLE-?????????????? (CommandButton, Label, Checkbox, OptionButton, Frame, DriveListBox).

? ??????? ?????? ???? ???????, ??????? ? ??????? ????? ??????????, ??? ?????? ??????????? ??? ??????? ??? ?????????? ???????.

????????:

OLEDragMode ???????????? ??????? ?????????? ? ???????? ???????-?????????.

OLEDropMode ???????????? ??????? ?????????? ? ???????? ???????-?????????.

??????:

OLEDrag ???????? ??????? ??????????????.

???????:

OLEDragDrop ?????????? ??? ?????????????? ???????-?????????

OLEDragOver ??????????, ????? ???? ????????? ?????????? ??? ??????.

OLEGiveFeedback ?????????? ????? ??????? ??????? OLEDragOver ? ???????????? ?????????? ???????? ????? (????????, ????????? ??????? ????).

OLEStartDrag ?????????? ??? ?????????? ?????? OLEDrag ??? ??? ????????????? ??????????????? OLE-??????????????.

OLECompleteDrag ?????????? ????? ??????????? ???????-????????? ? ??????-???????? ??? ?????????????? ????????? ? ?????????? ??? ??????

??? OLE-?????????????? ?? ????????? ??????? ??????????? ????? ?????? ? ??????????????? ???????. ????? ????????????, ????? ???????? ? ????? ??????? ?????????: ??????????? ??? ???????????. ?? ??????????? ??????? ????? ?????? ??????????? ? ??????????????? ??????? ??????????????.

 

??????-????????

??? ? ??? ??????? ??????????????, ??????? OLE-?????????????? ?????????? ??????? ?????? OLEDrag:

Private Sub Textl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = vbLeftButton Then

Textl.OLEDrag

End If

End Sub

????? OLEDrag ?? ????? ?????????? ? ?? ????????? ??????????????? ????? ??????, ? ?????? ???????? ??????? ??????????????.

 

 

??????-????????

?? ??????????? ??????? ???????? OLEDropMode ?????? ????? ???????? vbOLEDropManual. ????? ?????? ???????????, ??? ????????? ?????????? ??????? OLEDragDrop. ????? ????, ?????????? ???????? ?????????? ??????? OLEDragOver, ? ??????? ??????? ????????? ??? ??????????????? ?????????? ? ??????? ???????? (????????, ??? ?????? ??? ????? ???? ??????????? ??? ???????????).

????????? ??? ??????????????? ?????????? ????? ? ??????? ?????? GetFormat ??????? Data, ??????? ???????? ?????????? ??????? OLEDragOver.

 

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

If Data.GetFormat (vbCFFiles) Then ...

?.?. ???????? ?????????????? ???????????? ??????????????? ????????? ? ????? GetFormat ? ????????? ?????????? ? True. ????? ???????????? ????????? ???? ????????:

vbCFText - ???? ??? ????????? ????????? (*.txt) ??????.

vbCFBitmap - ???? ??? ????????? bmp-??????.

vbCFMetafile - ???? ??? ????????? wmf-??????.

vbCFFiles - ???? ??? ????????? ?????? (?????).

vbCFRTF - ???? ??? ????????? RTF-??????.

 

????? ???????? ?????????? ????????? ???????? ? ??????? ????????? ????????? ??????? OLEDragOver Effect.

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

vbDragEffectNone - ?????? ?? ?????????? (???????????? ??? ?????? ?????-???? ???????? ??? ???????? ??????? ??????????????? ??????).

vbDragEffectCopy - ???????? ??????? ?? ????????? ? ????????.

vbDragEffectMove - ?????????? ??????? ?? ????????? ? ????????.

? ??????????? ?? ???????? ????????? Effect ????? ???????????? ????????? ??????? ????.

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

??? ????????? ??????? ????? ?? ??????????????? ?????????? ???????? ? ??????? ????? For Each ?? ????????? Files ??????? Data (Data - ???????? ??????? OLEDragDrop).

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

For Each fff In Data.Files

lstList1.AddItem fff

Next fff

????? ???????, ? ??????????? ????? ??????? ?? ??????????, ??? ????????? ?????? ???? ?????????? ? ???????????? ???????.

 

?????? ???????????????? ?LE-??????????????: ?? ????? ?????????? textBox. ??? ??????????? ?????????? ?????? ?? ??????????, ????? ??????????? ? TextBoxe

 

'1.???????? ?? ????? TextBox. ?????????? ??? ???????? OLEDropMode ? "Manual", ???????? "MultiLine" ? "True".

'

'2.???????? ???????? ?????? ??????

Sub DropFile(ByVal txt As TextBox, ByVal strFN$)

Dim iFile As Integer

iFile = FreeFile

Open strFN For Input Access Read Lock Read _

Write As #iFile

Dim Str$, strLine$

While Not EOF(iFile) And Len(Str) <= 32000

Line Input #iFile, strLine$

If Str <> "" Then Str = Str & vbCrLf

Str = Str & strLine

Wend

Close #iFile

txt.SelStart = Len(txt)

txt.SelLength = 0

txt.SelText = Str

End Sub

 

'3.???????? ???????? ? ??????? OLEDragOver.

Private Sub Text1_OLEDragOver(Data As _

DataObject, Effect As Long, Button As Integer, _

Shift As Integer, X As Single, Y As Single, State _

As Integer)

If Data.GetFormat(vbCFFiles) Then

Effect = vbDropEffectCopy And Effect

Exit Sub

End If

Effect = vbDropEffectNone

End Sub

 

'4.???????? ???????? ? ??????? OLEDragDrop.

Private Sub Text1_OLEDragDrop(Data As _

DataObject, Effect As Long, Button As Integer, _

Shift As Integer, X As Single, Y As Single)

If Data.GetFormat(vbCFFiles) Then

Dim vFN

For Each vFN In Data.Files

DropFile Text1, vFN

Next vFN

End If

End Sub

 

'?????? ????????? ??????????, ???????? ?????????, ???????? ????????? ????????? ?????? ? "??????????" ?? ? TextBox. ?????? ?? ?????? ????? ?????? ? ????????? ????.



 

???????????

??????????




????????

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


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