cSelfDrag.cls
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:1k
源码类别:
浏览器
开发平台:
Visual Basic
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "cSelfDrag"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- '存储自己的页面上的拖放的数据
- Option Explicit
- '是否自身的Drag
- Public SelfDraging As Boolean
- '是否在自己上Drop了
- Public OleDrop As Boolean
- 'drag窗口的Index
- Public DragFormIndex As Long
- 'drag drop 到的窗口的index
- Private DropIndex As Long
- 'drag源的类型
- Public SrcType As String
- '源文本(拖拽的文本,链接,图片地址)
- Public SrcStr As String
- '文件路径
- Public SrcFilePath As String
- 'html text
- Public SrcHtmlText As String
- Public dragX As Long, dragY As Long
- '当前被drag的TextRange
- Public SelRange As Object
- 'Public pDisp As Object
- Public Sub Reset()
- SelfDraging = False
- OleDrop = False
- DragFormIndex = -1
- DropIndex = -1
- SrcType = ""
- SrcStr = ""
- SrcFilePath = ""
- Set SelRange = Nothing
- 'Set pDisp = Nothing
- End Sub
- Private Sub Class_Initialize()
- Call Reset
- End Sub
- Public Function OleDragDrop(index As Long) As Boolean
- If SelfDraging Then
- OleDrop = True
- DropIndex = index
- End If
- OleDragDrop = OleDrop
- End Function