المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : BHO Problem



C# Programming
08-21-2009, 08:19 AM
Hi all,

Some one please can help me by converting the following code.

This works fine for the frames. and how to do for the other tags like button and links

The following code for frames works fine:

HTMLDocument document;
IHTMLElementCollection elcol = document.getElementsByTagName("iframe");
foreach (IHTMLElement iel in elcol)
{
HTMLFrameElement frm = (HTMLFrameElement)iel;
DispHTMLDocument doc1 = (DispHTMLDocument)((SHDocVw.IWebBrowser2)frm).Document;
DE = (HTMLDocumentEvents2_Event)doc1;
DE.onclick += new HTMLDocumentEvents2_onclickEventHandler(DE_onclick);
}

But i dont know how to do for the input buttons. Can you help me how to proceed with the following code.

IHTMLElementCollection buttons = document.getElementsByTagName("INPUT");
foreach (IHTMLInputElement iel in buttons)
{
HTMLInputElement button = (HTMLInputElement)iel;

//What to implement here to trigger the event that should contain IHTMLEventObj pEvtObj arguement
}

thanks in advance and awaiting for the solution...