Click here to Skip to main content
15,885,365 members
Home / Discussions / C#
   

C#

 
QuestionWriting a custom exception and the "meaning" of the code Pin
Kaare Tragethon10-Sep-09 1:47
Kaare Tragethon10-Sep-09 1:47 
AnswerRe: Writing a custom exception and the "meaning" of the code Pin
Not Active10-Sep-09 1:51
mentorNot Active10-Sep-09 1:51 
GeneralRe: Writing a custom exception and the "meaning" of the code Pin
Kaare Tragethon10-Sep-09 2:00
Kaare Tragethon10-Sep-09 2:00 
QuestionNeed Help ! Pin
Jacobb Michael10-Sep-09 1:30
Jacobb Michael10-Sep-09 1:30 
AnswerRe: Webbrowser Control Pin
Arun Jacob10-Sep-09 1:32
Arun Jacob10-Sep-09 1:32 
GeneralRe: Webbrowser Control Pin
Jacobb Michael10-Sep-09 1:38
Jacobb Michael10-Sep-09 1:38 
GeneralRe: Webbrowser Control Pin
Arun Jacob10-Sep-09 1:50
Arun Jacob10-Sep-09 1:50 
GeneralRe: Webbrowser Control Pin
Jacobb Michael10-Sep-09 1:58
Jacobb Michael10-Sep-09 1:58 
Well i just give the entire code block.

 private SHDocVw.InternetExplorer browser;
 private SHDocVw.ShellWindows shellWindows;
 private ArrayList Current_IE_Handles;

#region Constructors
        public Form1()
        {
            InitializeComponent();
            Current_IE_Handles = new ArrayList();
            shellWindows = new SHDocVw.ShellWindowsClass();
            shellWindows.WindowRegistered += new SHDocVw.DShellWindowsEvents_WindowRegisteredEventHandler(shellWindows_WindowRegistered);
            shellWindows.WindowRevoked += new SHDocVw.DShellWindowsEvents_WindowRevokedEventHandler(shellWindows_WindowRevoked);
        }
        #endregion


private void shellWindows_WindowRegistered(int z)
        {
            string filnam;

            foreach (SHDocVw.InternetExplorer ie in shellWindows)
            {
                filnam = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();

                if (filnam.Equals("iexplore"))
                {
                    browser = ie;

                    bool check = true;

                    for (int i = 0; i < Current_IE_Handles.Count; i++)
                    {
                        if (Current_IE_Handles[i].ToString() == browser.HWND.ToString())
                        {
                            check = false;
                        }
                    }

                    if (check == true)
                    {
                        browser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(browser_DocumentComplete);
                        browser.FileDownload += new DWebBrowserEvents2_FileDownloadEventHandler(browser_FileDownload);
                    }
                }
            }
        }

 void browser_FileDownload(ref bool Cancel)
        {
            //throw new Exception("The method or operation is not implemented.");
        }


After running this program
when you open Internet Explorer(IE) the DOM object will be created.
and when ever the changes happens in the IE(navigate,document completer,) event will be fired.
using that i have traced all the visited urls,popups,print activity,etc but i dont get event fired for File Download

thanks
AnswerRe: Need Help ! Pin
Not Active10-Sep-09 1:44
mentorNot Active10-Sep-09 1:44 
GeneralRe: Need Help ! Pin
Jacobb Michael10-Sep-09 1:48
Jacobb Michael10-Sep-09 1:48 
QuestionIs any event available ? Pin
Jacobb Michael10-Sep-09 1:24
Jacobb Michael10-Sep-09 1:24 
AnswerRe: Is any event available ? Pin
Arun Jacob10-Sep-09 1:25
Arun Jacob10-Sep-09 1:25 
GeneralRe: Is any event available ? Pin
Jacobb Michael10-Sep-09 1:33
Jacobb Michael10-Sep-09 1:33 
GeneralRe: Is any event available ? Pin
Dave Kreskowiak10-Sep-09 4:44
mveDave Kreskowiak10-Sep-09 4:44 
Questionconvert byte to octet Pin
hadad10-Sep-09 1:16
hadad10-Sep-09 1:16 
AnswerRe: convert byte to octet Pin
stancrm10-Sep-09 2:24
stancrm10-Sep-09 2:24 
GeneralRe: convert byte to octet Pin
musefan10-Sep-09 2:31
musefan10-Sep-09 2:31 
GeneralRe: convert byte to octet Pin
stancrm10-Sep-09 3:19
stancrm10-Sep-09 3:19 
GeneralRe: convert byte to octet Pin
musefan10-Sep-09 3:21
musefan10-Sep-09 3:21 
AnswerRe: convert byte to octet Pin
musefan10-Sep-09 2:30
musefan10-Sep-09 2:30 
AnswerRe: convert byte to octet Pin
Luc Pattyn10-Sep-09 2:46
sitebuilderLuc Pattyn10-Sep-09 2:46 
QuestionFileDownload eventhandler not firing Pin
Jacobb Michael10-Sep-09 1:11
Jacobb Michael10-Sep-09 1:11 
Questionc# installer Pin
askhar51610-Sep-09 0:40
askhar51610-Sep-09 0:40 
AnswerRe: c# installer Pin
Keith Barrow10-Sep-09 0:55
professionalKeith Barrow10-Sep-09 0:55 
GeneralRe: c# installer Pin
askhar51610-Sep-09 17:58
askhar51610-Sep-09 17:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.