一、程序核心
本程序的核心是通过API函数获得窗口句柄并获得浏览器访问的网址,在此基础上可以实现用Winsock控件进行远程的监视和管理。
1.先创建一个工程并在窗口Form1中,并声明下面的四个API函数和两个常量:
Option Explicit Private Declare Function FindWindow Lib ″user32″ Alias ″FindWindowA″ (ByVal lpCl assName As String, ByVal lpWindowName As String) As Long
′Findwindow函数的功能是找到当前运行的IE窗口的url地址的句柄
Private Declare Function SendMessage Lib ″user32″ Alias ″SendMessageA″ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long)...[ 查看全文 ]