private void button2_Click(object sender, EventArgs e) { listBox1.Items.Clear(); listBox1.Items.Add("locating IE with google web page "); if (_doc == null) { _doc = HookingIE.AttachToIEFromWebAddressExample(); } else { listBox1.Items.Add("Document already attached, using corrent document "); } if (_doc == null) { MessageBox.Show("Unable to locate window with google chrome"); return; } listBox1.Items.Add("IE found attaching load events"); var windowEvts = (_doc.parentWindow as HTMLWindowEvents2_Event); windowEvts.onload += WindowEvtsOnOnload; button3.Enabled = true; // DOMEventHandler onmousedownhandler = new DOMEventHandler(_doc); // onmousedownhandler.Handler += new DOMEvent(Mouse_Down); }
private void button1_Click(object sender, EventArgs e) { listBox1.Items.Add("locating IE with google web page "); _doc = HookingIE.AttachToIEFromWebAddressExample(); _doc.InjectJavascript("alert('TEST')"); button3.Enabled = true; }