web = new WebBrowser2(this);//这的this指的是Form
web.Initialize();//初始化环境
web.ClientRectangle = new Rectangle(0, 0, 780, 400);
web.CreateBrowserWindow(); //创建窗口对象
web.Navigate("http://www.google.com");//转向网页
web.EventBeforeNavigate -= new WebBrowser2.BeforeNavigateHandler(web_BeforeNavigate);
web.EventDocumentComplete += new WebBrowser2.DocumentCompleteHandler(web_DocumentComplete);
web.EventCursorAction += new WebBrowser2.CursorActionHandler(web_CursorAction); //鼠标动作事件
//以String做为参数,传回的即是用字符串表示的动作,如上下,上左,上右等,当前最多只识别到两个动作