how can i put and use progress bar in my web browser in windowes application project with c# language?
+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
2010-08-02 08:31:29
where do you define "CurrentProgress"?what does this mean?what does first line of your code before function do?
fariba
2010-08-18 08:56:06
Clarified answer.
Matthew Abbott
2010-08-18 09:32:35
Thank you Mr.Abbottcould you tell me how i can merge MenuItems of parent and child with same name ??????????
fariba
2010-08-18 10:07:56
i want to correct my question:parent form an child form
fariba
2010-08-18 10:21:12
You'll have to explain that a bit more, possibly raise it as a new SO question.
Matthew Abbott
2010-08-18 10:23:34
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
2010-08-18 14:39:54