﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Progress / Activity Bar as a Class</title><link>http://www.visualbasicscript.com/</link><description /><copyright>(c) VBScript Forum</copyright><ttl>30</ttl><item><title> RE: Progress / Activity Bar as a Class (NssB)</title><description>  &lt;blockquote class="quote"&gt;&lt;i&gt;&lt;/i&gt;&lt;br&gt; Seasoned professional! LOL!&lt;/blockquote&gt; &lt;br&gt;   &lt;br&gt;  &lt;pre class="prettyprint"&gt;
 #include &amp;lt;iostream.h&amp;gt;
  #include &amp;lt;string.h&amp;gt;
  class string
  {
   private:
    int size;
    char *ptr;
   public:
    string() : size(0), ptr(new char('\0')) {}
    string(const string &amp;amp;s) : size(s.size)
    {
      ptr = new char[size + 1];
      strcpy(ptr, s.ptr);
    }
    ~string()
    {
      delete [] ptr;
    }
    friend ostream &amp;amp;operator &amp;lt;&amp;lt;(ostream &amp;amp;, const string &amp;amp;);
    string &amp;amp;operator=(const char *);
  };
 								     
  ostream &amp;amp;operator&amp;lt;&amp;lt;(ostream &amp;amp;stream, const string &amp;amp;s)
  {
    return(stream &amp;lt;&amp;lt; s.ptr);
  }
  string &amp;amp;string::operator=(const char *chrs)
  {
    if (this != &amp;amp;chrs)
    {
      delete [] ptr;
      size = strlen(chrs);
      ptr = new char[size + 1];
      strcpy(ptr, chrs);
    }
    return(*this);
  }
  int main()
  {
    string str;
    str = "Hello World";
    cout &amp;lt;&amp;lt; str &amp;lt;&amp;lt; endl;
    return(0);
  }&lt;/pre&gt; &lt;br&gt;   &lt;br&gt;   &lt;br&gt;  Seasoned what?? &lt;br&gt;   &lt;br&gt;  Clearly does not get out much and has too much time on one's hands! &lt;br&gt;  &lt;b&gt;&lt;/b&gt; </description><link>http://www.visualbasicscript.com/fb.ashx?m=36176</link><pubDate>Thu, 13 Jul 2006 09:51:13 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (Fredledingue)</title><description>  &lt;b&gt;DiGiTAL.SkReAM&lt;/b&gt; &lt;br&gt;  &lt;b&gt;&lt;/b&gt;&amp;nbsp; &lt;br&gt;  &lt;b&gt;Here is a link for you &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s6.gif" alt="" /&gt;&lt;/b&gt; &lt;br&gt;  &lt;b&gt;&lt;/b&gt;&amp;nbsp; &lt;br&gt;  &lt;b&gt;&lt;a href="http://www.gnu.org/fun/jokes/helloworld.html" target="_blank" rel="nofollow"&gt;http://www.gnu.org/fun/jokes/helloworld.html&lt;/a&gt;&lt;/b&gt; &lt;br&gt;  &lt;b&gt;&lt;/b&gt;&amp;nbsp; &lt;br&gt;  Seasoned professional! LOL! &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36162</link><pubDate>Wed, 12 Jul 2006 17:51:06 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (Fredledingue)</title><description>  DigitalSKREAM, &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I'm not mad at all and I sincerly do appreciate your input on this forum and your progressbar script in particular. &lt;br&gt;  What I meant above is that, indeed, we can learn a lot of things by reading your code. &lt;br&gt;  I apologize if my reply sounded offensive. It was not intended to be so. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36143</link><pubDate>Wed, 12 Jul 2006 06:40:52 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (ehvbs)</title><description>  Hi DiGiTAL.SkReAM, &lt;br&gt;    &lt;br&gt;   Quote: &lt;br&gt;    &lt;br&gt;   &amp;nbsp;&amp;nbsp;  I will leave the posting to those of you with far more experience. &lt;br&gt;    &lt;br&gt;   Please don't! I would miss your contributions. &lt;br&gt;    &lt;br&gt;   ehvbs &lt;br&gt;    &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36137</link><pubDate>Wed, 12 Jul 2006 05:23:37 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (DiGiTAL.SkReAM)</title><description>  &lt;blockquote class="quote"&gt;&lt;i&gt;&lt;/i&gt;&lt;br&gt;ORIGINAL: Fredledingue &lt;br&gt;   &lt;br&gt;  No problem, Digital Skream! &lt;br&gt;   &lt;br&gt;  I was just curious. And I agree: [sarcasm]&amp;nbsp;the most important goal of these&amp;nbsp;routines is that others can use them too in other script. If a beginner reads one of your script, he will learn about almost all the possibilities of VBS.&amp;nbsp;[/sarcasm] &lt;br&gt;   &lt;br&gt;  I will analys this interrresting script again in the future. I will find many things that I don't know. Thanks. &lt;br&gt;   &lt;br&gt;  &lt;/blockquote&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  Why are you so mad?&amp;nbsp; I've not been insulting at all, nor have I been a jerk about any of this.&amp;nbsp; I've just explained why&amp;nbsp;I posted the non-optimized (read: contains more code than is strictly needed to do the job) code that I did, since you questioned me about it.&amp;nbsp; What's the big deal?&amp;nbsp; At no point have I ever said that "if a beginner reads one of my scripts he will learn almost all the possibilities of VBS".&amp;nbsp;  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I freely admit that i have only been writing vbscript for about a year now.&amp;nbsp; Before that, I was limited to quickbasic 4.5 and batch.&amp;nbsp; So what I don't understand is the sarcasm and general anger that the above snippet of yours seems to be portraying towards me.&amp;nbsp;  &lt;br&gt;  I was under the impression that the purpose of posting code in the Post a VBScript forum was to share snippets of code that we find interesting or usefull and want to share with the community.&amp;nbsp; If I was mistaken, i sincerely apologize and won't do it again.&amp;nbsp; I did not mean to step on anyone's toes by posting code or trying to help others with their questions. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I will leave the posting to those of you with far more experience. &lt;br&gt;  &amp;nbsp; &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36130</link><pubDate>Wed, 12 Jul 2006 03:57:25 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (Fredledingue)</title><description>  No problem, Digital Skream! &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I was just curious. And I agree: [sarcasm]&amp;nbsp;the most important goal of these&amp;nbsp;routines is that others can use them too in other script. If a beginner reads one of your script, he will learn about almost all the possibilities of VBS.&amp;nbsp;[/sarcasm] &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I will analys this interrresting script again in the future. I will find many things that I don't know. Thanks. &lt;br&gt;  &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s5.gif" alt="" /&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  About the concatenation of the string... I agree that using arrays and dictionary is much faster than "var = var &amp;amp; text". I myself made some experiments and attended the conversation. &lt;br&gt;  What I don't undertsand is why you need to "concatenate" this string, (except for the fun of it).... because it's a static string! &lt;br&gt;  Look: &lt;br&gt;  in &lt;br&gt;  &amp;nbsp; &lt;br&gt;  HTAcode&amp;nbsp; = &amp;nbsp; "some line of code" _  &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" _  &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" _  &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" &lt;br&gt;  &amp;nbsp; &lt;br&gt;  There is no event, just a value given to a variable. &lt;br&gt;  You could write it like that as well: &lt;br&gt;  &amp;nbsp; &lt;br&gt;  HTAcode&amp;nbsp; = &amp;nbsp; "some line of code" &amp;amp; VbCrlf &amp;amp; "some more line of code" &amp;amp; VbCrlf &amp;amp; "some more line of code" &amp;amp; VbCrlf &amp;amp; "some more line of code"  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  ...but that's not easy to read in the editor. &lt;br&gt;   &lt;br&gt;  In the case of creating an HTA the VbCrlf's are superflous. They are useful only if you want to read the HTA source later for checking. &lt;br&gt;  So it can be like this: &lt;br&gt;  &amp;nbsp; &lt;br&gt;  HTAcode&amp;nbsp; = &amp;nbsp; "some line of code" _&amp;nbsp; &lt;br&gt;   &amp;amp; "some more line of code" _&amp;nbsp; &lt;br&gt;   &amp;amp; "some more line of code" _&amp;nbsp; &lt;br&gt;   &amp;amp; "some more line of code"  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  Or does it still takes more time than dashing them in a dictionary? &lt;br&gt;  What does take time is this: &lt;br&gt;  &amp;nbsp; &lt;br&gt;  HTAcode&amp;nbsp; = HTAcode &amp;amp; VbCrlf &amp;amp;&amp;nbsp; "some line of code"  &lt;br&gt;  HTAcode&amp;nbsp; = HTAcode &amp;amp; VbCrlf &amp;amp; "some more line of code"  &lt;br&gt;  HTAcode&amp;nbsp; = HTAcode &amp;amp; VbCrlf &amp;amp; "some more line of code"  &lt;br&gt;  HTAcode&amp;nbsp; = HTAcode &amp;amp; VbCrlf &amp;amp; "some more line of code"  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  ...because the variable is everytime rewritten in the memory (as I understand). Not when you set it once. &lt;br&gt;  Am I wrong? &lt;br&gt;   &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36114</link><pubDate>Tue, 11 Jul 2006 17:11:29 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (ebgreen)</title><description>  If it makes you feel any better it takes me just shy of 900 lines to write a line to a text file using my Logger class.&amp;nbsp;&lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s6.gif" alt="" /&gt; </description><link>http://www.visualbasicscript.com/fb.ashx?m=36110</link><pubDate>Tue, 11 Jul 2006 12:26:11 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (DiGiTAL.SkReAM)</title><description>  This really should be in the other thread, but I guess it deosn't matter. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  To answer your questions, : &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &lt;blockquote class="quote"&gt;&lt;i&gt;&lt;/i&gt;&lt;br&gt; &lt;br&gt;  20 lines to erase a registry key &lt;br&gt;  &lt;/blockquote&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  The 20 lines you mention are part of the subKillRegistrykey subroutine.&amp;nbsp; That routine is taken almost verbatim from the includes file that I use in all of my scripts.&amp;nbsp; Since it is in the includes file, it needs to be as generic as possible so that it can be used in many different scripts.&amp;nbsp; And since I am lazy by nature, i figured I would just paste it in with a minimum of trimming... it doesn't hurt anything, and heck, someone else might want to pilfer the code for use in their own scripts in a different way.&amp;nbsp;  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  Also, you will notice that it will delete a key, even if there are values, or subkeys under it. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &lt;blockquote class="quote"&gt;&lt;i&gt;&lt;/i&gt;&lt;br&gt; &lt;br&gt;  25 lines to delete a file &lt;br&gt;  &lt;/blockquote&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  By this, I assume that you are referring to the fKillFile function.&amp;nbsp; That routine is taken almost verbatim from the includes file that I use in all of my scripts.&amp;nbsp; Since it is in the includes file, it needs to be as generic as possible so that it can be used in many different scripts.&amp;nbsp; And since I am lazy by nature, i figured I would just paste it in with a minimum of trimming... it doesn't hurt anything, and heck, someone else might want to pilfer the code for use in their own scripts in a different way. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &lt;blockquote class="quote"&gt;&lt;i&gt;&lt;/i&gt;&lt;br&gt; &lt;br&gt;  The&amp;nbsp;most incredible&amp;nbsp;is maybe using the dictionary to form the hta code in a text string.  &lt;br&gt;  Why not using...:  &lt;br&gt;   &lt;br&gt;  HTAcode&amp;nbsp; = &amp;nbsp; "some line of code" _  &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" _  &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" _  &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code"  &lt;br&gt;  &lt;/blockquote&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  I use a dictionary object because that is how I do my string concatenation.&amp;nbsp; It is about 250 times faster - on average - than doing string = string &amp;amp; newstring. &lt;br&gt;  Of course, if you were just going to be catting a small string  &lt;br&gt;  &lt;pre class="prettyprint"&gt;
 sMyString = "Fred" &amp;amp; "ledingue"
 &lt;/pre&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  then yes, it would be faster to use strings.&amp;nbsp; BUT, if you are doing a large amount of catting, then it is undeniably faster to use arrays or dictionaries for that than to use strings.&amp;nbsp; We've done studies on this previously here in the forums, and it has been confirmed.&amp;nbsp; Because of this speed benefit, I use dictionaries almost exclusively for my string concatenation through the use of a class to handle them that, once again, is in my includes file. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  Now, the reason that I included all of these "bloated" functions and subroutines in my ProgressBar class is because they &lt;br&gt;  1.) Work with no difficulty &lt;br&gt;  2.) Provide others with ready-made functions and subs that they can use int heir scripts, almost verbatim from what I have posted here &lt;br&gt;  3.) Are easily pasted in to make my job easier &lt;br&gt;  &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s4.gif" alt="" /&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36108</link><pubDate>Tue, 11 Jul 2006 11:12:00 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (Fredledingue)</title><description>  Very nice little progressbar. &lt;br&gt;  &amp;nbsp; &lt;br&gt;  But why so complicated? &lt;br&gt;  &amp;nbsp; &lt;br&gt;  20 lines to erase a registry key, 25 lines to&amp;nbsp;delete a file... are you working for M$ or what? &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s6.gif" alt="" /&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  The&amp;nbsp;most incredible&amp;nbsp;is maybe using the dictionary to form the hta code in a text string. &lt;br&gt;  Why not using...: &lt;br&gt;  &amp;nbsp; &lt;br&gt;  HTAcode&amp;nbsp; = &amp;nbsp; "some line of code" _ &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" _ &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code" _ &lt;br&gt;  &amp;amp; VbCrlf &amp;amp; "some more line of code"  &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s4.gif" alt="" /&gt; &lt;br&gt;  &amp;nbsp; &lt;br&gt;  &amp;nbsp; &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=36084</link><pubDate>Mon, 10 Jul 2006 15:23:41 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (Jack in the Box)</title><description>  Thanks for the updated code.&amp;nbsp; I've been using your HTA-based progress bar since I first found it and I just happened to come back and see you updated your original post with an IE based progress bar.&amp;nbsp; I like the changes. &lt;br&gt;   &lt;br&gt;  There is one minor error, you're missing the the following line somewhere before Line 41: &lt;br&gt;   &lt;br&gt;  Set oShell = CreateObject("Wscript.Shell") &lt;br&gt;   &lt;br&gt;  Other then that this piece of code works brilliantly.&amp;nbsp; Thanks again. </description><link>http://www.visualbasicscript.com/fb.ashx?m=35916</link><pubDate>Tue, 04 Jul 2006 09:03:58 GMT</pubDate></item><item><title> RE: Progress / Activity Bar as a Class (ebgreen)</title><description>  Very nice. I plan to shanelessly steal this code promptly.&amp;nbsp;&lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s6.gif" alt="" /&gt;&lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s12.gif" alt="" /&gt; </description><link>http://www.visualbasicscript.com/fb.ashx?m=31688</link><pubDate>Wed, 01 Mar 2006 08:34:49 GMT</pubDate></item><item><title> Progress / Activity Bar as a Class (DiGiTAL.SkReAM)</title><description>  &lt;b&gt;I have posted two progress bars.&amp;nbsp; &lt;/b&gt; &lt;br&gt;  &lt;b&gt;&lt;/b&gt; &lt;br&gt;  &lt;b&gt;The HTA-based bar - cleaner, looks better, more stable during long&amp;nbsp;executions&amp;nbsp;- can be found here: &lt;/b&gt;&lt;a href="http://www.visualbasicscript.com/m_32390/tm.htm" target="_blank" rel="nofollow"&gt;&lt;b&gt;http://www.visualbasicscript.com/m_32390/tm.htm&lt;/b&gt;&lt;/a&gt; &lt;br&gt;   &lt;br&gt;  &lt;b&gt;&lt;/b&gt; &lt;br&gt;  &lt;b&gt;And the one posted below is the IE-based one.&amp;nbsp; I don't like this one as much as it is kinda limited as to what it looks like, and you can't get rid of the title bar.&amp;nbsp; &lt;/b&gt; &lt;br&gt;  &lt;b&gt;I am also no longer supporting it with additional code-updates so any errors are kinda stuck there. heh heh&lt;/b&gt; &lt;br&gt;  &lt;b&gt;But some folks like it so I'll leave it around.&lt;img src="http://www.visualbasicscript.com/upfiles/smiley/s6.gif" alt="" /&gt;&lt;/b&gt; &lt;br&gt;  &lt;b&gt;=============&lt;/b&gt; &lt;br&gt;   &lt;br&gt;   &lt;br&gt;  Here is a small class that I put together to have a progress or "wait-till-I'm-finished!" bar that pops up while the script goes on with other tasks. &lt;br&gt;  It doesn't really show percent complete or anything, just a series of colored squares that move back and forth while it is showing.&amp;nbsp; This goes on until &lt;br&gt;  the window is closed. &lt;br&gt;  The text it displays can also be changed on the fly, to reflect changes in status, etc. &lt;br&gt;  This is a pretty heavily modified version of an actual progress indicator from the web, made into a class for ease of use. &lt;br&gt;  Attached is a screenshot of what it looks like when running: &lt;br&gt;   &lt;br&gt;   &lt;br&gt;  &lt;pre class="prettyprint"&gt;
 Class ProgressBar
 ' This class allows the creation of an object for use in displaying a
 ' "progress bar" type of display to the user while the script performs
 ' other tasks int he background.&amp;nbsp; Very usefull to show that the script
 ' is still working or has finished.
 ' Usage: First, create a new instance of the object with a unique name.
 '&amp;nbsp;&amp;nbsp;&amp;nbsp; set oMyNewProgressBar = New ProgressBar
 ' Then, call the object's .StartBar function with an argument of the 
 ' initial message that you wish to display.
 '&amp;nbsp; oMyNewProgressBar.StartBar "This is my message.&amp;nbsp; Please wait."
 ' Then, if you want to change the displayed message, call the object's
 ' .SetLine function with an argument of what you want to change the
 ' message to.
 '&amp;nbsp; oMyNewProgressBar.SetLine "This is my new message.&amp;nbsp; Wait longer."
 ' To close the object, call it's .CloseBar function.
 '&amp;nbsp; oMyNewProgressBar.CloseBar
 Dim oWaitBarIE, oTextLine, oProgressBar, oQuitFlag
 Public Function StartBar(sMessageToDisplay)
 &amp;nbsp; Set oWaitbarIE = CreateObject("InternetExplorer.Application")
 &amp;nbsp; &amp;nbsp;With oWaitbarIE
 &amp;nbsp;&amp;nbsp;&amp;nbsp; .height = 230
 &amp;nbsp;&amp;nbsp;&amp;nbsp; .width = 400
 &amp;nbsp;&amp;nbsp;&amp;nbsp; .menubar = False
 &amp;nbsp;&amp;nbsp;&amp;nbsp; .toolbar = false
 &amp;nbsp;&amp;nbsp;&amp;nbsp; .statusbar = false
 &amp;nbsp;&amp;nbsp;&amp;nbsp; .addressbar = False
 &amp;nbsp;.Navigate("about:blank")
 End With 
 fWriteHtmlToDialog oWaitbarIE.Document
 &amp;nbsp; set oTextLine = oWaitbarIE.Document.All("txtMilestone")
 &amp;nbsp; Set oProgressBar = oWaitbarIE.Document.All("pbText")
 &amp;nbsp; set oQuitFlag = oWaitbarIE.Document.Secret.pubFlag
 &amp;nbsp; oTextLine.innerTEXT = sMessageToDisplay
 &amp;nbsp; oWaitbarIE.visible = True
 &amp;nbsp; oShell.AppActivate("PLEASE WAIT - Microsoft Internet Explorer")
 End Function
 Public Function CloseBar()
 On Error Resume Next
 oWaitbarIE.quit
 End Function 
 Public Function SetLine(sNewText)
 'On Error Resume Next
 oTextLine.innerTEXT = sNewText
 End Function 
 Private Function fWriteHtmlToDialog(oDocument)
 Const conBarSpeed = 80
 With oWaitbarIE.Document
 &amp;nbsp;.Open
 &amp;nbsp;.Writeln "&amp;lt;html&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;title&amp;gt;PLEASE WAIT&amp;lt;/title&amp;gt; "
 &amp;nbsp;.Writeln "&amp;lt;style&amp;gt;"
 &amp;nbsp;.Writeln " BODY {background: Silver} BODY { overflow:hidden }"
 &amp;nbsp;.Writeln " P.txtStyle {color: Navy; font-family: Verdana; font-size: 10pt; font-weight: bold; margin-left: 10px } "
 &amp;nbsp;.Writeln " input.pbStyle {color: navy; font-family: Wingdings; font-size: 10pt; background: Silver; height: 20px; width: 340px } " 
 &amp;nbsp;.Writeln "&amp;lt;/style&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;div id=""objProgress"" class=""Outer""&amp;gt;&amp;lt;/div&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;CENTER&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;P id=txtMilestone class='txtStyle' style='margin-left: 10px'&amp;gt; &amp;lt;/P&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;input type='text' id='pbText' class='pbStyle' value='' &amp;gt;" 
 &amp;nbsp;.Writeln "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;/CENTER&amp;gt;" 
 &amp;nbsp;.Writeln "&amp;lt;form name='secret' &amp;gt;&amp;lt;input type='hidden' name='pubFlag' value='run' &amp;gt;&amp;lt;/form&amp;gt;" 
 &amp;nbsp;.Writeln "&amp;lt;SCRIPT LANGUAGE='VBScript' &amp;gt;" 
 &amp;nbsp;.Writeln "Function PctComplete(nPct)"
 &amp;nbsp;.Writeln "pbText.Value = String(nPct,"" "") &amp;amp; String(4,""n"")"
 &amp;nbsp;.Writeln "End Function"
 &amp;nbsp;.Writeln "Sub UpdateProgress()"
 &amp;nbsp;.Writeln "Dim intStep"
 &amp;nbsp;.Writeln "Dim intDirection"
 &amp;nbsp;.Writeln "If (IsNull(objProgress.getAttribute(""Step"")) = True) Then"
 &amp;nbsp;.Writeln "intStep = 0"
 &amp;nbsp;.Writeln "Else"
 &amp;nbsp;.Writeln "intStep = objProgress.Step"
 &amp;nbsp;.Writeln "End If"
 &amp;nbsp;.Writeln "if (IsNull(objProgress.GetAttribute(""Direction""))=True) Then"
 &amp;nbsp;.Writeln "intDirection = 0"
 &amp;nbsp;.Writeln "Else"
 &amp;nbsp;.Writeln "intDirection = objProgress.Direction"
 &amp;nbsp;.Writeln "End If"
 &amp;nbsp;.Writeln "if intDirection=0 then"
 &amp;nbsp;.Writeln "intStep = intStep + 1"
 &amp;nbsp;.Writeln "else"
 &amp;nbsp;.Writeln "intStep = intStep - 1"
 &amp;nbsp;.Writeln "end if"
 &amp;nbsp;.Writeln "Call PctComplete(intStep)"
 &amp;nbsp;.Writeln "if intStep&amp;gt;=23 then"
 &amp;nbsp;.Writeln "intDirection=1"
 &amp;nbsp;.Writeln "end if"
 &amp;nbsp;.Writeln "if intStep&amp;lt;=0 then"
 &amp;nbsp;.Writeln "intDirection=0"
 &amp;nbsp;.Writeln "end if"
 &amp;nbsp;.Writeln "objProgress.SetAttribute ""Step"", intStep"
 &amp;nbsp;.Writeln "objProgress.SetAttribute ""Direction"", intDirection"
 &amp;nbsp;.Writeln "Window.setTimeout GetRef(""UpdateProgress""), " &amp;amp; conBarSpeed
 &amp;nbsp;.Writeln "End Sub"
 &amp;nbsp;.Writeln "Sub Window_OnLoad()"
 &amp;nbsp;.Writeln "theleft = (screen.availWidth - document.body.clientWidth) / 2"
 &amp;nbsp;.Writeln "thetop = (screen.availHeight - document.body.clientHeight) / 2"
 &amp;nbsp;.Writeln "window.moveTo theleft,thetop"
 &amp;nbsp;.Writeln "window.opener = ""x"""
 &amp;nbsp;.Writeln "Window.setTimeout GetRef(""UpdateProgress""), " &amp;amp; conBarSpeed
 &amp;nbsp;.Writeln "End Sub"
 &amp;nbsp;.Writeln "&amp;lt;/SCRIPT&amp;gt;"
 &amp;nbsp;.Writeln "&amp;lt;/html&amp;gt;"
 &amp;nbsp;.Close 
 End With 
 End Function
 End Class
 &lt;/pre&gt;  &lt;br&gt;   &lt;br&gt;   &lt;br&gt;  [image]local://8013/C53295005FC44ABC81A7D117E7A8B5C1.JPG[/image]  &lt;br&gt;   </description><link>http://www.visualbasicscript.com/fb.ashx?m=31631</link><pubDate>Tue, 28 Feb 2006 11:02:56 GMT</pubDate></item></channel></rss>
