<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>API Programming &#187; Uncategorized</title>
	<atom:link href="http://www.brangle.com/wordpress/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brangle.com/wordpress</link>
	<description>Just another computer weblog</description>
	<lastBuildDate>Wed, 14 Dec 2011 07:35:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hulu Referral Coupon Code (2 Free Weeks)</title>
		<link>http://www.brangle.com/wordpress/2010/12/hulu-referral-coupon-code-2-free-weeks/</link>
		<comments>http://www.brangle.com/wordpress/2010/12/hulu-referral-coupon-code-2-free-weeks/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 03:14:29 +0000</pubDate>
		<dc:creator>lopezg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hulu]]></category>

		<guid isPermaLink="false">http://www.brangle.com/wordpress/?p=627</guid>
		<description><![CDATA[<p>Hulu has recently come out with their new Hulu Plus service and is offering 2 free weeks of service using the following referral coupon code: http://hulu.com/r/q3_YSg</p> ]]></description>
			<content:encoded><![CDATA[<p>Hulu has recently come out with their new Hulu Plus service and is offering 2 free weeks of service using the following referral coupon code: <a href="http://hulu.com/r/q3_YSg" target="_blank">http://hulu.com/r/q3_YSg</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brangle.com/wordpress/2010/12/hulu-referral-coupon-code-2-free-weeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use the Progress Bar in VB.NET and C#</title>
		<link>http://www.brangle.com/wordpress/2009/08/how-to-use-the-progress-bar-in-vb-net-and-c-sharp/</link>
		<comments>http://www.brangle.com/wordpress/2009/08/how-to-use-the-progress-bar-in-vb-net-and-c-sharp/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 03:32:38 +0000</pubDate>
		<dc:creator>lopezg</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.brangle.com/wordpress/?p=566</guid>
		<description><![CDATA[The progress bar is one of those universal objects that everyone recognizes, it's useful when doing a large or long task. For example, if your updating/deleting/copying a bunch of files you can update the progress bar as you modify each file. [...]]]></description>
			<content:encoded><![CDATA[<p>The progress bar is one of those universal objects that everyone recognizes, it&#8217;s useful when doing a large or long task.  For example, if your updating/deleting/copying a bunch of files you can update the progress bar as you modify each file.<span id="more-566"></span></p>
<div id="attachment_567" class="wp-caption aligncenter" style="width: 298px"><img src="http://www.brangle.com/wordpress/wp-content/uploads/2009/08/ProgressBarApp.jpg" alt="Progress Bar App with VB.NET and C#" title="Progress Bar App with VB.NET and C#" width="288" height="121" class="size-full wp-image-567" /><p class="wp-caption-text">Progress Bar App with VB.NET and C#</p></div>
<p>There are several lines of code to pay attention to, let me outline them here in further detail.<br />
<b>Line 7</b> &#8211; we can think of the maximum as how many steps their are.  We can say we want a 1000 steps, or only 20 steps.  This makes it useful if you want to update a random number of objects stored in an array, in that case we could store the <i>ProgressBar1.Maximum = UBound(arrSomeArray)</i>.<br />
<b>Line 9</b> &#8211; we are just initializing our progress bar to 0<br />
<b>Line 11</b> &#8211; we make the progress bar visible.  This step is up to you, I infrequently use the progress bar and I usually keep it hidden until I have a reason to display it.  If your progress bar is already visible you can delete this line of code<br />
<b>Line 13</b> &#8211; this line is completely unrelated to the progress bar, whatever value is specified in the <i>Sleep</i> argument is how long your application will wait to update.  In this application, I decided to wait 1000 milliseconds (or 1 second) before I goto the next step, this will allow us to see the progress bar update so we can simulate a test scenario.<br />
<b>Line 15-29</b> &#8211; This is just updating the progress bar, then waiting some more, nothing to special going on here. As you can see the value I am raising the progress bar is completely arbitrary.<br />
<b>Line 30</b> &#8211; Print out a message box saying complete<br />
<b>Line 31</b> &#8211; Hide the progress bar so that it is no longer visible, we&#8217;ve already told the user that the task is complete, there&#8217;s no need to continue showing the progress bar. Again, this line of code is entirely up to you.</p>
<p><b>This is the code for a VB.NET progress bar example</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="vbnet" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">'This code was developed by Gerardo Lopez and was downloaded from www.brangle.com</span>
<span style="color: #008080; font-style: italic;">'Complete source code is available at:</span>
<span style="color: #008080; font-style: italic;">'http://www.brangle.com/wordpress/2009/08/how-to-use-the-progress-bar-in-vb-net-and-c-sharp/</span>
&nbsp;
<span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> Button1_Click<span style="color: #000000;">&#40;</span><span style="color: #FF8000;">ByVal</span> sender <span style="color: #FF8000;">As</span> System.<span style="color: #FF0000;">Object</span>, <span style="color: #FF8000;">ByVal</span> e <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">EventArgs</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Handles</span> Button1.<span style="color: #0000FF;">Click</span>
    <span style="color: #008080; font-style: italic;">'Set the total number of steps to 100 (or 100%)</span>
    ProgressBar1.<span style="color: #0000FF;">Maximum</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">100</span>
    <span style="color: #008080; font-style: italic;">'Set the initial value of the progress bar to 0% completed</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span>
    <span style="color: #008080; font-style: italic;">'If your progress bar is already visible you don't need this. But this is one of those objects I like to hide when I'm not using it</span>
    ProgressBar1.<span style="color: #0000FF;">Visible</span> <span style="color: #008000;">=</span> <span style="color: #0600FF;">True</span>
    <span style="color: #008080; font-style: italic;">'This next line tells your application to wait or go to sleep for 1000ms / 1 second</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    <span style="color: #008080; font-style: italic;">'Update the progress bar to 15% completed</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">15</span>
    <span style="color: #008080; font-style: italic;">'Wait for another second</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    <span style="color: #008080; font-style: italic;">'Update to 30% complete</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">30</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">45</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">60</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">75</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">90</span>
    System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span>.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span>
    ProgressBar1.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">100</span>
    <span style="color: #0600FF;">MsgBox</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Complete!&quot;</span><span style="color: #000000;">&#41;</span>
    ProgressBar1.<span style="color: #0000FF;">Visible</span> <span style="color: #008000;">=</span> <span style="color: #0600FF;">False</span>
<span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></pre></td></tr></table></div>

<p><b>This is the source code for a C# progress bar example</b><br />
The code only varies slightly in C#, I&#8217;ll make sure to explain any differences.  Besides the semicolons at the end of every line, only lines 12, 31, and 32 differ from the VB.NET example.<br />
<b>Line 12, Line 32</b> &#8211; Boolean values must be in lower case.<br />
<b>Line 31</b> &#8211; Showing a message box is slightly different in VB.NET, if you didn&#8217;t add the following headers <i>using System.Windows.Forms;</i> in your source code, then you will need to specify the full class name.  I included it so that this example can work on as many peoples projects as possible.  If you are already including <i>Systems.Windows.Forms</i> then you can show a message box by replacing line 31 with: <i>MessageBox.Show(&#8220;Complete!&#8221;);</i></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">//This code was developed by Gerardo Lopez and was downloaded from www.brangle.com</span>
<span style="color: #666666;">//Complete source code is available at:</span>
<span style="color: #666666;">//http://www.brangle.com/wordpress/2009/08/how-to-use-the-progress-bar-in-vb-net-and-c-sharp/</span>
&nbsp;
<span style="color: #0000ff;">private</span> <span style="color: #0000ff;">void</span> button1_Click<span style="color: #008000;">&#40;</span>object sender, EventArgs e<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #666666;">//Set the total number of steps to 100 (or 100%)</span>
    progressBar1.<span style="color: #007788;">Maximum</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">100</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">//Set the initial value of the progress bar to 0% completed</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">//If your progress bar is already visible you don't need this. But this is one of those objects I like to hide when I'm not using it</span>
    progressBar1.<span style="color: #007788;">Visible</span> <span style="color: #000080;">=</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">//This next line tells your application to wait or go to sleep for 1000ms / 1 second</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">//Update the progress bar to 15% completed</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">15</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">//Wait for another second</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">//Update to 30% complete</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">30</span><span style="color: #008080;">;</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">45</span><span style="color: #008080;">;</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">60</span><span style="color: #008080;">;</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">75</span><span style="color: #008080;">;</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">90</span><span style="color: #008080;">;</span>
    System.<span style="color: #007788;">Threading</span>.<span style="color: #007788;">Thread</span>.<span style="color: #007788;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    progressBar1.<span style="color: #007788;">Value</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">100</span><span style="color: #008080;">;</span>
    System.<span style="color: #007788;">Windows</span>.<span style="color: #007788;">Forms</span>.<span style="color: #007788;">MessageBox</span>.<span style="color: #007788;">Show</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Complete!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    progressBar1.<span style="color: #007788;">Visible</span> <span style="color: #000080;">=</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.brangle.com/wordpress/2009/08/how-to-use-the-progress-bar-in-vb-net-and-c-sharp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Humor: Tech Support Cheat Sheat</title>
		<link>http://www.brangle.com/wordpress/2009/08/humor-tech-support-cheat-sheat/</link>
		<comments>http://www.brangle.com/wordpress/2009/08/humor-tech-support-cheat-sheat/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 07:34:51 +0000</pubDate>
		<dc:creator>lopezg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brangle.com/wordpress/?p=488</guid>
		<description><![CDATA[Hilarious tech support cheat sheet [...]]]></description>
			<content:encoded><![CDATA[<p>Hilarious tech support cheat sheet&#8230;<span id="more-488"></span></p>
<div id="attachment_489" class="wp-caption aligncenter" style="width: 742px"><a href="http://xkcd.com/627/" target="_blank"><img class="size-full wp-image-489 " title="Hey Megan, it's your father. How do I print out a flowchart?" src="http://www.brangle.com/wordpress/wp-content/uploads/2009/08/tech_support_cheat_sheet.png" alt="tech_support_cheat_sheet" width="732" height="823" /></a><p class="wp-caption-text">Hey Megan, it&#39;s your father. How do I print out a flowchart?</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.brangle.com/wordpress/2009/08/humor-tech-support-cheat-sheat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Humor: Solve Computer Overheating Problems with this Quick Fix</title>
		<link>http://www.brangle.com/wordpress/2009/08/humor-solve-computer-overheating-problems-with-this-quick-fix/</link>
		<comments>http://www.brangle.com/wordpress/2009/08/humor-solve-computer-overheating-problems-with-this-quick-fix/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 06:33:56 +0000</pubDate>
		<dc:creator>lopezg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Funny]]></category>

		<guid isPermaLink="false">http://www.brangle.com/wordpress/?p=263</guid>
		<description><![CDATA[Haha, I don't know why I couldn't stop laughing when I saw this photo, I guess it's one way to solve an overheating problem... [...]]]></description>
			<content:encoded><![CDATA[<p>Haha, I don&#8217;t know why I couldn&#8217;t stop laughing when I saw this photo, I guess it&#8217;s one way to solve an overheating problem&#8230;<span id="more-263"></span></p>
<p><div id="attachment_264" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.brangle.com/wordpress/wp-content/uploads/2009/08/gregorymcomputerfan.jpg"><img src="http://www.brangle.com/wordpress/wp-content/uploads/2009/08/gregorymcomputerfan.jpg" alt="Massive Computer Fan" title="Massive Computer Fan" width="500" height="375" class="size-full wp-image-264" /></a><p class="wp-caption-text">Massive Computer Fan</p></div><br />
&#8230;And I thought my fan was loud.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brangle.com/wordpress/2009/08/humor-solve-computer-overheating-problems-with-this-quick-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

