Hey
i have this "webbrowser" i sort of made myself, but i want a
"ToolStripProgressBar" but i cant make it show the progress from my browser.
what du i need to do what cammand will i need to call in which event
//Martin
Hey
i have this "webbrowser" i sort of made myself, but i want a
"ToolStripProgressBar" but i cant make it show the progress from my browser.
what du i need to do what cammand will i need to call in which event
//Martin
toolstrip progressbar
Christopher Bermingham
Copy this to a new class named ProgressForm, and you got yourself a progress bar on the bottom of the form.
using
System;using
System.Collections.Generic;using
System.Text;using
System.Windows.Forms;namespace
Test{
class ProgressForm : Form{
private StatusStrip statusStrip1; private ToolStripProgressBar toolStripProgressBar1; private void InitializeComponent(){
this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); // // statusStrip1 // this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripProgressBar1}); this.statusStrip1.Location = new System.Drawing.Point(0, 244); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(600, 22); this.statusStrip1.TabIndex = 0; this.statusStrip1.Text = "statusStrip1"; // // toolStripProgressBar1 // this.toolStripProgressBar1.Name = "toolStripProgressBar1"; this.toolStripProgressBar1.Size = new System.Drawing.Size(100, 16); // // ProgressForm // this.ClientSize = new System.Drawing.Size(600, 266); this.Controls.Add(this.statusStrip1); this.Name = "ProgressForm"; this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout();}
}
}
NeedHelper
hmmm
still aint happening notrhing but a hell-load of errors
try make something like a little tutorial plz!
like:
1. make new form name it etc etc
2. make a stutus strip and make progressbar in it.. etc etc
etc etc. plz !
//Martin
Klemenp
Sorry, now I understand...
I've asked our expert on WebBrowser (Itizk Katzav) and gave me this answer:
"The WebBrowser has event called ProgressChanged that informs the progress
This is a sample of Itzik's code
<summary>
/// Tracing the progress
/// </summary>
/// <param name="sender">The event's sender</param>
/// <param name="e">The event's arguments</param>
public void wb_main_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
StatusStripHandler.InitProgressBar((int)e.MaximumProgress);
StatusStripHandler.StatusStripHandler.SetStatus(txt_location.Text, (int)e.CurrentProgress);
}
Do remeber to update your progress as needed and not as we wrote it since this is our custom progress bar code, so just write your own
Peter Senescu
there aint happening "***" with tat code, cause idont know how to use it
think you can tell mw that i cant just paste it inte the toolstripprogressbar1 when i wiev its code, it comes with a hell-load of errors. please help me!
//Martin
Tom Morgan
using: Visual Basic 2005 express edition
Eli - i think you misunderstand me..
i want it to show thw progress from my browserwindow! like in firefox/opera/netscape/IE and so on. so that i can se how long its with loading a page!
//Martin
LiuCong
Well the easiest way is assign a integer and increment the integer value during the search and pass the integer value to the status bar. for eg.
statusbar.increment(integervalue)
raju44u
Hi Guys,
I too am a beginner. I have a working dtabase search with the toolstrip bar, but how do I connect it to the search progress
Last night I was up until 3am and I finally gave up. I set maximum, etc, and thought I had a connection through a toolbox but nope.
Thanks,
LjG
dwee
thx to you its working perferctly ^^
thx again.
and thanks to Eli too (:
thx everybody, se you
//Martin
Rodrigo Vieira
M-Studios
Do not forget that you can use the events navigating and navigated the last one can be used to hide back the progress bar and changing the title and assign it to the tab if u have tabs, etc.....
Gilles BECAVIN
The ToolStripProgressBar is used on a Strip item such as MenuStrip, ToolStrip and in your case StatusStrip.
by the desinger, you should drag StatusStrip and then you can select ToolStripProgressBar to add to it
or by code:
ToolStripProgressBar toolStripProgressBar1 = new ToolStripProgressBar ();
toolStripProgressBar1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText;
toolStripProgressBar1.Size = new System.Drawing.Size(100, 15);
StatusStrip statusStrip1 = new StatusStrip();
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripProgressBar1});
this.statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
this.statusStrip1.Location = new System.Drawing.Point(0, 272);
this.statusStrip1.Size = new System.Drawing.Size(599, 22);
Dan Amiga
Eli:
Were am i Supposed to put the code in when i put it in the "progresschanged" event for webbrowser1 it just gives a lot of errors. i tryid to put names and stuff in the code. ut nothing but errors
Itzik:
how am i supposed to use these events what shall i write in them
// Martin
CRNaik
first of all ge to know this site it has very basic samples that will get you started:
http://www.windowsforms.net/Default.aspx tabindex=4&tabid=49
Here is the web browser sample download page:
http://www.windowsforms.net/Samples/download.aspx PageId=1&ItemId=216&tabindex=4
again this is avery basic sample but has a location label that works and progress bar that works, and the code is very similar to what i would use, so try it and if you want anything else send ask ehre another question and i will answe rit for you or i will create a demo project with your needed events and send it to your mail.
but first try the web browser demo project it is very good startup point
Itzik Katzav
SneshaA
For 2005, here is a full tutorial:
1. File --> New Project --> Windows Application
2. From the tool box double click on StatusStrip (under Menus & ToolBars category).
3. You will see the status panel on the bottom, you will see a drop down button, click it and select - progressbar.
4. Thats it, you got your self a progressbar, to change its value, write:
toolStripProgressBar1.Value = 50;
James Cole