SideBandDemo.cls
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:2k
源码类别:
浏览器
开发平台:
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 = "cSideBandDemo"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Option Explicit
- Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
- Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
- Private Const GWL_STYLE As Long = -16
- Private Const WS_CHILD As Long = &H40000000
- Private Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
- Private Declare Function MoveWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
- Implements LEPluginLib.ILESideBand
- Dim m_frm As frmMain
- Private Sub Class_Initialize()
- If Not m_frm Is Nothing Then
- Unload m_frm
- Set m_frm = Nothing
- End If
- End Sub
- Private Sub ILESideBand_CloseBand()
- If Not m_frm Is Nothing Then
- Unload m_frm
- Set m_frm = Nothing
- End If
- End Sub
- Private Sub ILESideBand_Resize(ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long)
- If Not m_frm Is Nothing Then
- If m_frm.Visible Then
- MoveWindow m_frm.hwnd, x, y, cx, cy, 1
- Else
- MoveWindow m_frm.hwnd, x, y, cx, cy, 0
- End If
- End If
- End Sub
- Private Function ILESideBand_SendMessage(ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
- End Function
- Private Sub ILESideBand_SetSite(ByVal hParent As Long, ByVal vOutPort As LEPluginLib.ILEInfo)
- On Error Resume Next
- If m_frm Is Nothing Then
- Set m_frm = New frmMain
- Load m_frm
- SetWindowLong m_frm.hwnd, GWL_STYLE, _
- GetWindowLong(m_frm.hwnd, GWL_STYLE) Or WS_CHILD
- End If
- If Not m_frm Is Nothing Then
- SetParent m_frm.hwnd, hParent
- MoveWindow m_frm.hwnd, 0, 0, 100, 200, 0
- End If
- End Sub
- Private Sub ILESideBand_ShowBand(ByVal bShow As Boolean)
- m_frm.Visible = bShow
- End Sub