mMix.bas
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:3k
源码类别:
浏览器
开发平台:
Visual Basic
- Attribute VB_Name = "mMix"
- Option Explicit
- Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
- Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
- Public Const SW_NORMAL As Long = 1
- Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
- Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
- Public Const WM_MOUSEMOVE As Long = &H200
- Public Const WM_RBUTTONDOWN As Long = &H204
- Public Const WM_RBUTTONUP As Long = &H205
- Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
- Public Const VK_RBUTTON As Long = &H2
- Public Const VK_CONTROL As Long = &H11
- Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
- Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
- Public Const WM_SYSCOMMAND As Long = &H112
- Public Const SC_CLOSE As Long = &HF060
- Public Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
- Public Const ClassName_IEFrm As String = "IEFrame"
- Public Const ClassName_IE As String = "Internet Explorer_Server"
- Public Const ClassName_Flash As String = "MacromediaFlashPlayerActiveX"
- Public Const ClassName_ShellEmbedding As String = "Shell Embedding"
- Public Const ClassName_ShellDocObjectView As String = "Shell DocObject View"
- Public IEBrowser As InternetExplorer
- Public Function GetClassNameVb(nHwnd As Long) As String
- Dim rtn As String, tLen&
- rtn = Space(255)
- tLen = GetClassName(nHwnd, rtn, 255)
- If tLen > 0 Then
- rtn = Left(rtn, tLen)
- Else
- rtn = ""
- End If
- GetClassNameVb = rtn
- End Function
- Public Function IsWebCtrl(ByVal nHwnd&) As Boolean
- While nHwnd <> 0
- If GetClassNameVb(nHwnd) = ClassName_ShellDocObjectView Then
- IsWebCtrl = True
- Exit Function
- Else
- nHwnd = GetParent(nHwnd)
- End If
- Wend
- IsWebCtrl = False
- End Function
- Public Function MAKELONG(wLow As Long, wHigh As Long) As Long
- MAKELONG = wHigh * &H10000 + wLow
- End Function
- Public Function vkPress(vkcode As Long) As Boolean
- If (GetAsyncKeyState(vkcode) And &H8000) <> 0 Then
- vkPress = True
- Else
- vkPress = False
- End If
- End Function