tags:

views:

25

answers:

2

how can i put and use progress bar in my web browser in windowes application project with c# language?

+1  A: 

Look at the WebBrowser.ProgressChanged event.

leppie
+1  A: 

The WebBrowser control has a ProgressChanged event:

You need to attach an event handler to the ProgressChanged event:

WebBrowser1.ProgressChanged += WebBrowser1_ProgressChanged;

This is shorthand for:

WebBrowser1.ProgressChanged += new WebBrowserProgressChangedEventHandler(WebBrowser1_ProgressChanged);

The compiler will infer the handler and add that at compile time.

Next, implement the handler:

private void WebBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e) {
    ProgressBar1.Value = e.CurrentProgress;
}

The WebBrowserProgressChangedEventArgs type supports a CurrentProgress property which reflects the current state of the browser control's progress.

Matthew Abbott
where do you define "CurrentProgress"?what does this mean?what does first line of your code before function do?
fariba
Clarified answer.
Matthew Abbott
Thank you Mr.Abbottcould you tell me how i can merge MenuItems of parent and child with same name ??????????
fariba
i want to correct my question:parent form an child form
fariba
You'll have to explain that a bit more, possibly raise it as a new SO question.
Matthew Abbott
i raised but i dont receive any answeri explain to you with example : i have 2 form,in one of them ISmdicontainer is true and it is parentform,this form have menu strip that is named file with 2 items: open and new.other form will open in the form above and will be childform, this form have menu strip that is named file too.this file menu have 2 items : save and exit.when i open second form in first form, i have one menu strip with to file in it.I want to have one file whit 4 items :open,new,save,exit
fariba