<?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>Team Tutorials &#187; Programming Tutorials</title>
	<atom:link href="http://teamtutorials.com/programming-tutorials/feed" rel="self" type="application/rss+xml" />
	<link>http://teamtutorials.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Dec 2011 18:58:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Parsing XML Feed to an Array with XPath</title>
		<link>http://teamtutorials.com/web-development-tutorials/php-tutorials/parsing-xml-feed-to-an-array-with-xpath?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=parsing-xml-feed-to-an-array-with-xpath</link>
		<comments>http://teamtutorials.com/web-development-tutorials/php-tutorials/parsing-xml-feed-to-an-array-with-xpath#comments</comments>
		<pubDate>Sun, 16 Jan 2011 00:17:36 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/?p=2649</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/web-development-tutorials/php-tutorials/parsing-xml-feed-to-an-array-with-xpath' addthis:title='Parsing XML Feed to an Array with XPath' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>Recently while working on a project, I found myself needed to parse several different types of files through the same mechanism (CSV, pipe delimited, XML, and more). I decided that it would be best to get each time of feed to a identical object that could then be run through the same methods regardless of the input type. This tutorial will walk you through using PHP and XPath to parse the values from an XML file and store them into array for later manipulation. ]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/web-development-tutorials/php-tutorials/parsing-xml-feed-to-an-array-with-xpath' addthis:title='Parsing XML Feed to an Array with XPath' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>Recently while working on a project, I found myself needed to parse several different types of files through the same mechanism (CSV, pipe delimited, XML, and more). I decided that it would be best to get each time of feed to a identical object that could then be run through the same methods regardless of the input type. This tutorial will walk you through using PHP and XPath to parse the values from an XML file and store them into array for later manipulation. </p>
<p>To start, for those that are unfamiliar with XPath. It is a mechanism which will allow you to easily navigate and retrieve elements and attributes from XML and HTML. It&#8217;s preety simple to understand and can make life a lot easier when dealing with these languages.<br />
Let&#8217;s take a look at the following XML example. An XPath is literally just a path to whatever attribute or element you are looking to get. </p>
<pre class="brush: xml; title: Code Snippet:; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;catalog&gt;
   &lt;book id=&quot;bk101&quot;&gt;
      &lt;author&gt;Gambardella, Matthew&lt;/author&gt;
      &lt;title&gt;XML Developer's Guide&lt;/title&gt;
      &lt;genre&gt;Computer&lt;/genre&gt;
      &lt;price&gt;44.95&lt;/price&gt;
      &lt;publish_date&gt;2000-10-01&lt;/publish_date&gt;
      &lt;description&gt;An in-depth look at creating applications
      with XML.&lt;/description&gt;
   &lt;/book&gt;
   &lt;book id=&quot;bk102&quot;&gt;
      &lt;author&gt;Ralls, Kim&lt;/author&gt;
      &lt;title&gt;Midnight Rain&lt;/title&gt;
      &lt;genre&gt;Fantasy&lt;/genre&gt;
      &lt;price&gt;5.95&lt;/price&gt;
      &lt;publish_date&gt;2000-12-16&lt;/publish_date&gt;
      &lt;description&gt;A former architect battles corporate zombies,
      an evil sorceress, and her own childhood to become queen
      of the world.&lt;/description&gt;
   &lt;/book&gt;
&lt;/catalog&gt;
</pre>
<p>//catalog/book/title would return the nodes that match that. In this case, there would be 2.</p>
<p>This is the basic idea behind XPath. If you are interested in learning more or need more information please review the information that they have over at <a href="http://www.w3schools.com/xpath/default.asp">w3schools</a> on the subject. They will be able to provide everything you need to get started.</p>
<p>First lets create our method that will do the actually data collection for us:</p>
<pre class="brush: php; title: Code Snippet:; notranslate">
   function parseXML($feed_url,$field_xpaths)
    {
        //Get file from url
        $file_contents = file_get_contents($feed_url);

        //create xml object
        $xml = new SimpleXMLElement($file_contents);

        //Work through all fields we need to collect
        foreach($field_xpaths[0] as $key=&gt;$field_xpath)
        {
            $count = 0;

            //Get an array of fields that match the current xpath
            $xpath_returns = $xml-&gt;xpath($field_xpath);
            //Iterate through the array and assign values to the coupon array
            while(list( , $node) = each($xpath_returns))
            {
                $rows[$count][$key] = $node;
                $count++;
            }
        }

        return $rows;
    }
</pre>
<p>When you break this down, you see how simple this really is to achieve. The way this function is written, it will accept an array for the $field_xpaths variable. Then it will iterate the through the array treating each as it&#8217;s own xpath. Each value will use it&#8217;s key in the array as it&#8217;s name (in my example, these values are pulled from a database, so the column name is the name of the key for that value in the array). </p>
<p>It first grabs the entire contents of the file and associates a SimpleXMLElements object to them. This object will allow us to use XPath operators to navigate through our nodes. For each set in the array (key and value) we get all values that match the XPath provided. We then iterate through each value in the returned array and store it in a master array (in this case it&#8217;s just called rows). When this is done processing, all values for each xpath will be stored in an multi dimensional array that you can call by name. For example, I said that mine were from a database and one of my column names (which would then become a key in the array of results) was named store_name. I would then be able to access the stores at $rows[intCount]['store_name'].</p>
<pre class="brush: php; title: Code Snippet:; notranslate">
$field_locations = getFieldLocations($result['feed_id']); //Method to query the database and get the XPath values from it.
$feed_array = parseXML($result['feed_url'],$field_locations); //Calls the parser method.
</pre>
<p>The above code just calls the function and store the result into the array. You can now take this array and do what you need to with it. That concludes this tutorial. I hope it was easy to follow, and as always, feel free to comment or ask questions. Thanks for reading. </p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/web-development-tutorials/using-jquery-to-reorder-a-list-and-update-a-database" title="Using jQuery to Reorder a List and Update a Database">Using jQuery to Reorder a List and Update a Database</a></li><li><a href="http://teamtutorials.com/other-tutorials/disable-uacuser-access-control-in-windows-vista" title="Disable UAC(User Access Control) in Windows Vista">Disable UAC(User Access Control) in Windows Vista</a></li><li><a href="http://teamtutorials.com/photoshop-tutorials/carbon-fiber-website-header" title="Carbon Fiber Website Header">Carbon Fiber Website Header</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/jquery-pop-over-effects" title="jQuery Pop Over Effects">jQuery Pop Over Effects</a></li><li><a href="http://teamtutorials.com/windows-tutorials/how-to-add-users-in-windows-vista" title="How to Add Users in Windows Vista">How to Add Users in Windows Vista</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/web-development-tutorials/php-tutorials/parsing-xml-feed-to-an-array-with-xpath/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function &#8211; Splitting a string</title>
		<link>http://teamtutorials.com/programming-tutorials/function-splitting-a-string?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=function-splitting-a-string</link>
		<comments>http://teamtutorials.com/programming-tutorials/function-splitting-a-string#comments</comments>
		<pubDate>Tue, 19 Oct 2010 03:59:50 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[General Functions]]></category>
		<category><![CDATA[Programming Tutorials]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/?p=2620</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/function-splitting-a-string' addthis:title='Function &#8211; Splitting a string' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>Splitting a String on a Character There are a lot of functions out there that are very simple and easy to understand but are absolutely necessary to make fully functional applications. This week, we are going to begin with a simple string function: split. The split function (explode in PHP) allow the programmer to take [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/function-splitting-a-string' addthis:title='Function &#8211; Splitting a string' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>Splitting a String on a Character</p>
<p>There are a lot of functions out there that are very simple and easy to understand but are absolutely necessary to make fully functional applications. This week, we are going to begin with a simple string function: split. The split function (explode in PHP) allow the programmer to take a string and split that string into an array of strings on a character. For example, you could split a sentence into words by splitting on a space. As I said, this is a very simple function to use and understand.</p>
<p><strong>Visual Basic</strong></p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
'Build the string we want to split
Dim stringToSplit As String = &quot;this,is,a,string,that,needs,split&quot;

'Array of strings to store the split values in
Dim stringArray As String()

'Split the sting based on a character value
stringArray = stringToSplit.Split(&quot;,&quot;C)

'Iterate through the results from the split
For Each splitString As String In stringArray
	'add each string to a listbox
	lstStrings.Items.Add(splitString)
Next
</pre>
<p>We take a string and split it on a comma and add it to a list box control named lstStrings.</p>
<p><strong>C#</strong></p>
<pre class="brush: csharp; title: Code Snippet:; notranslate">
            //Build the string we want to split
            string stringToSplit = &quot;this,is,a,string,that,needs,split&quot;;

            //Array of strings to store the split values in
            string[] stringArray;

            //Split the sting based on a character value
            stringArray = stringToSplit.Split(',');

            //Iterate through the results from the split
            foreach (string splitString in stringArray)
            {
                //add each string to a listbox
                lstStrings.Items.Add(splitString);
            }
</pre>
<p>We take a string and split it on a comma and add it to a list box control named lstStrings.</p>
<p><strong>PHP</strong></p>
<pre class="brush: php; title: Code Snippet:; notranslate">
//Create a string to split
$stringToSplit = &quot;this,is,a,string,that,needs,split&quot;;

//Just showing this value is an array (not neccessary with PHP)
$stringArray = array();

//Split the string on a character (explode in PHP is a split function)
$stringArray = explode($stringToSplit,',');

//Start table HTML
$html = &quot;&lt;table&gt;&quot;;
//Iterate through the array
foreach($stringArray as $stringSingle)
{
    //Build the rows for the table
   $html .= &quot;&lt;tr&gt;&quot;.$stringSingle.&quot;&lt;/tr&gt;&quot;;
}

//End table HTML
$html .= &quot;&lt;/table&gt;&quot;;

//Output the table
echo $html;
</pre>
<p>We take a string and split it into an array. Then we iterate through the array and put the values into a table.</p>
<p><strong>Java</strong></p>
<pre class="brush: java; title: Code Snippet:; notranslate">
        //Create a string to split
        String stringToSplit = &quot;this,is,a,string,that,needs,split&quot;;

        //Create array for string to be split into and run split on it
        final String stringArray[] = stringToSplit.split(&quot;,&quot;);

        //Iterate through the array
        for(int r=0;r&lt;stringArray.length; r++)
        {
            stringList.setModel(new javax.swing.AbstractListModel() {
                String[] strings = stringArray;
                public int getSize() { return strings.length; }
                public Object getElementAt(int i) { return strings[i]; }
            });
        }
</pre>
<p>Split the string and then add the values to a jList control. </p>
<p>As you can see, each language has it’s unique way of using this function but I think we can all agree that this is simple to understand and can be very helpful in our applications. Nice thing about this function is that if the string doesn’t contain the character you want to split on, it will still work as you will just get one string since there is nothing to split. It won’t throw an error. </p>
<p>That concludes this week’s tutorial. Hopefully it was easy to follow and understand and we’ll see you next week. Thanks for viewing.  </p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/windows-tutorials/creating-the-quick-launch-toolbar-show-desktop-icon" title="Creating the Quick Launch Toolbar &#8220;Show Desktop Icon&#8221;">Creating the Quick Launch Toolbar &#8220;Show Desktop Icon&#8221;</a></li><li><a href="http://teamtutorials.com/windows-tutorials/speed-up-your-pc-by-increasing-page-file-size" title="Speed Up Your PC by Increasing Page File Size">Speed Up Your PC by Increasing Page File Size</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/alternating-table-row-color-with-css-classes" title="Alternating Table Row Color With CSS Classes">Alternating Table Row Color With CSS Classes</a></li><li><a href="http://teamtutorials.com/windows-tutorials/create-a-windows-daily-backup-script" title="Create a Windows Daily Backup Script">Create a Windows Daily Backup Script</a></li><li><a href="http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays" title="Simple VB Code and All About Arrays">Simple VB Code and All About Arrays</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/function-splitting-a-string/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Handling Errors To Prevent Application Crashes in VB</title>
		<link>http://teamtutorials.com/programming-tutorials/handling-error-to-prevent-application-crashes-in-vb?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=handling-error-to-prevent-application-crashes-in-vb</link>
		<comments>http://teamtutorials.com/programming-tutorials/handling-error-to-prevent-application-crashes-in-vb#comments</comments>
		<pubDate>Fri, 27 Feb 2009 10:35:49 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/?p=1776</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/handling-error-to-prevent-application-crashes-in-vb' addthis:title='Handling Errors To Prevent Application Crashes in VB' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This tutorial will walk you through a very simple but extremely useful function in programming. When you write code you can never guarantee that specific requirements will be met upon execution and therefore errors are always a possibility. As a coder you need to be able foresee these types of issues and catch them before the application crashes and requires the user to restart it and even worse, lose data that they may have been working on.]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/handling-error-to-prevent-application-crashes-in-vb' addthis:title='Handling Errors To Prevent Application Crashes in VB' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>This tutorial will walk you through a very simple but extremely useful function in programming. When you write code you can never guarantee that specific requirements will be met upon execution and therefore errors are always a possibility. As a coder you need to be able foresee these types of issues and catch them before the application crashes and requires the user to restart it and even worse, lose data that they may have been working on. To do this, we will use a Try Catch Finally statement. We will go into detail in the tutorial. To start, let’s create a new project in Visual Basic.</p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_01.jpg" alt="basic_error_handling_in_vb_01" title="basic_error_handling_in_vb_01" width="228" height="192" class="alignnone size-full wp-image-1777" /></p>
<p>Click on Create next to Project to create our project.</p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_02.jpg" alt="basic_error_handling_in_vb_02" title="basic_error_handling_in_vb_02" width="540" height="464" class="alignnone size-full wp-image-1778" /></p>
<p>Name the project what you want and place it where you want as well. I called mine tutorial and stored it in a folder named mike on my desktop. Next we need to make the form. The first picture is what is should look like and the second is the items labeled with what I named each control so that yours can be the same. </p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_03.jpg" alt="basic_error_handling_in_vb_03" title="basic_error_handling_in_vb_03" width="208" height="103" class="alignnone size-full wp-image-1779" /><br />
<img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_04.jpg" alt="basic_error_handling_in_vb_04" title="basic_error_handling_in_vb_04" width="208" height="103" class="alignnone size-full wp-image-1780" /></p>
<p>Note that the plus sign is just a label with the “+” plus symbol as the text. Then we have two textboxes (txt1 and txt2) and finally a command button (cmdCalculate). Now, let’s double click on the button to begin our programming. </p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
        Try
            MsgBox(CInt(txt1.Text) + CInt(txt2.Text))
        Catch ex As Exception
            MsgBox(&quot;This message shows when it errors to tell you why:&quot; &amp; ex.Message)
        Finally
            MsgBox(&quot;This message shows whether it errors or not&quot;)
            txt1.Text = Nothing
            txt2.Text = Nothing
  End Try
</pre>
<p>All of this code should go in the sub for the button press. This is all the programming we will have to do to understand what this phrase does and why it can be so useful. First we initialize the “Try” statement. Anything under this section will be run once the code gets to this point. You can put multiple things in here and it will step through them until it completes or errors out. Here, we are attempting to convert anything in the textboxes to an integer so that they can be added together and show the result. Anything in the “Catch” section will be executed in the event that anything in the “Try” statement fails. Here we are popping a message box up and giving the user the information of why it failed. The “ex.message” is whatever message the exception that occurred carries so that we can inform the user of why it crashed. Anything in the finally statement will be executed either way. This is useful for connections and stuff so that whether the transaction fails or completes it will close the connection. In this sample, we are making a message box appear as well as clearing both text boxes whether the process fails or not. Finally we end the try statement.  Let’s run it and make sure it does what it is supposed to.</p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_05.jpg" alt="basic_error_handling_in_vb_05" title="basic_error_handling_in_vb_05" width="208" height="103" class="alignnone size-full wp-image-1781" /></p>
<p>Let’s start by putting in two numbers to make sure it adds them together correctly. I put in 34 and 54. </p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_06.jpg" alt="basic_error_handling_in_vb_06" title="basic_error_handling_in_vb_06" width="104" height="100" class="alignnone size-full wp-image-1782" /></p>
<p>You should get the above message box if it worked. Mine came to 88 which means it is working as it is expected.</p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_07.jpg" alt="basic_error_handling_in_vb_07" title="basic_error_handling_in_vb_07" width="242" height="100" class="alignnone size-full wp-image-1783" /></p>
<p>Then you will get the above message box as well because it is in the finally section of the code which is run either way. The textboxes should now clear as well. Next we will try to make sure our try, catch statement works properly. </p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_08.jpg" alt="basic_error_handling_in_vb_08" title="basic_error_handling_in_vb_08" width="208" height="103" class="alignnone size-full wp-image-1784" /></p>
<p>Lets put 34 in the first box and “35t” (thirty five and then the letter t). Then click the calculate button. </p>
<p><img src="http://teamtutorials.com/wp-content/uploads/2009/02/basic_error_handling_in_vb_09.jpg" alt="basic_error_handling_in_vb_09" title="basic_error_handling_in_vb_09" width="548" height="100" class="alignnone size-full wp-image-1785" /></p>
<p>Since we are trying to convert the text in txt2 to an integer and it contains a letter, that won’t work and it will error out with the above message. “Conversion from string “35t” to type ‘Integer’ is not valid” is the text that was stored in “ex.message”. Normally the app would have crashed due to an unhandled exception and made the user start over from scratch (which in our case isn’t a big deal, but when you are working on more advanced apps and a lot of data is involved it can be very annoying to have to start over). </p>
<p>Finally, you will get the message that appears whether the try works or not and the text boxes will be cleared. That concludes this tutorial. I hope you can see why the try, catch, finally statement is so important. It is a very common part of programming and is used to some extent in every language.  Once you get used to it, you can use multiple catch statements to catch different types of errors and do different things based on what type of error is caught. I hope this is helpful and that you were able to understand. Thanks for reading.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/web-development-tutorials/using-jquery-to-reorder-a-list-and-update-a-database" title="Using jQuery to Reorder a List and Update a Database">Using jQuery to Reorder a List and Update a Database</a></li><li><a href="http://teamtutorials.com/photoshop-tutorials/adobe-photoshop-cs3-style-icons" title="Adobe Photoshop CS3 Style Icons">Adobe Photoshop CS3 Style Icons</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/fix-the-timthumb-php-wordpress-exploit" title="Fix the timthumb.php WordPress exploit">Fix the timthumb.php WordPress exploit</a></li><li><a href="http://teamtutorials.com/site-news/team-tutorials-famous-blog-of-the-day" title="Team Tutorials &#8211; Famous Blog of the Day">Team Tutorials &#8211; Famous Blog of the Day</a></li><li><a href="http://teamtutorials.com/other-tutorials/combine-text-files-into-one-files-in-windows-mac-and-linux" title="Combine Text Files into One File in Windows, Mac, and Linux">Combine Text Files into One File in Windows, Mac, and Linux</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/handling-error-to-prevent-application-crashes-in-vb/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Microsoft SQL 2008 Express Edition</title>
		<link>http://teamtutorials.com/windows-tutorials/installing-microsoft-sql-2008-express-edition?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-microsoft-sql-2008-express-edition</link>
		<comments>http://teamtutorials.com/windows-tutorials/installing-microsoft-sql-2008-express-edition#comments</comments>
		<pubDate>Sun, 09 Nov 2008 05:19:53 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Windows Tutorials]]></category>
		<category><![CDATA[express edition]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/?p=1688</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/windows-tutorials/installing-microsoft-sql-2008-express-edition' addthis:title='Installing Microsoft SQL 2008 Express Edition' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This tutorial will walk you through installing Microsoft’s SQL Server 2008 Express Edition. This will allow us to create a database and start writing more advanced applications in Visual Basic that require a database. ]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/windows-tutorials/installing-microsoft-sql-2008-express-edition' addthis:title='Installing Microsoft SQL 2008 Express Edition' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>This tutorial will walk you through installing Microsoft’s SQL Server 2008 Express Edition. This will allow us to create a database and start writing more advanced applications in Visual Basic that require a database. Microsoft has the express edition available free for download at <a href="http://www.microsoft.com/sqlserver/2008/en/us/express.aspx">http://www.microsoft.com/sqlserver/2008/en/us/express.aspx</a> . This version will allow you to do anything you will need for most personal and small business databases. The database size is limited to 4 gigs but most small business and stuff won&#8217;t even get close to that. If that is too small for you, you should really consider buying the software. Let’s get started. </p>
<p>***NOTE*** The first several steps are only required if you don’t have .NET 3.5 installed on your machine already. There is also extra windows (not all of which are pictured in this tutorial) for PowerShell and Windows Installer 4.5. It won’t require you to download them and install it if you already have them.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_01.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_01.jpg" alt="" title="installing_ms_sql_2008_express_01" width="358" height="180" class="alignnone size-medium wp-image-1690" /></a></p>
<p>Once you are at the pager, click on the Free Download button and it will take you to a login page. You need to register or already have a live account. It is free to register so go ahead. Once you get past that and log in, it will ask you to verify some information Once you verify the information and click on continue you will go to the download page.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_02.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_02.jpg" alt="" title="installing_ms_sql_2008_express_02" width="338" height="90" class="alignnone size-medium wp-image-1691" /></a></p>
<p>Near the top of the download page, you should see the download now image. Click on this to begin the download. This will download a 605 kilobyte file that will download and install the software for you. Once this file downloads, launch it and you can start the installation process.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_03.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_03.jpg" alt="" title="installing_ms_sql_2008_express_03" width="378" height="459" class="alignnone size-medium wp-image-1692" /></a></p>
<p>You will be given a window that has the EULA for .NET Framework 3.5. Review this document and agree to continue. </p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_04.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_04.jpg" alt="" title="installing_ms_sql_2008_express_04" width="452" height="185" class="alignnone size-medium wp-image-1693" /></a></p>
<p>Next, this window will appear and start downloading the .Net Framework.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_05.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_05.jpg" alt="" title="installing_ms_sql_2008_express_05" width="452" height="185" class="alignnone size-medium wp-image-1694" /></a></p>
<p>Once you are done downloading, it will automatically begin installing it for you.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_06.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_06.jpg" alt="" title="installing_ms_sql_2008_express_06" width="493" height="168" class="alignnone size-medium wp-image-1695" /></a></p>
<p>This window will come up during the process….this part may take some time, so please be patient and let it complete. </p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_07.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_07.jpg" alt="" title="installing_ms_sql_2008_express_07" width="452" height="185" class="alignnone size-medium wp-image-1696" /></a></p>
<p>You will get the above window alerting you that your machine must be rebooted before continuing. Save and close out of anything you are doing (and bookmark this page to come back an finish) and the give it the ok to reboot. Once windows reboots it may or may not restart the installation. If it doesn’t, just click on the setup icon and it will resume.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_08.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_08.jpg" alt="" title="installing_ms_sql_2008_express_08" width="381" height="178" class="alignnone size-medium wp-image-1697" /></a></p>
<p>It should begin to download another file like shown above. Just download the file and then run it to resume the rest of the installation. </p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_091.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_091.jpg" alt="" title="installing_ms_sql_2008_express_091" width="536" height="402" class="alignnone size-medium wp-image-1711" /></a></p>
<p>This window lets you pick which version you want to install. The options for additional services and with tools both will also install Windows PowerShell which is a scripting utility. I am going to go with the tools as well. This will give us the manager which will allow us to create databases, columns, and information.  Click on install to begin installing the needed software.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_10.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_10.jpg" alt="" title="installing_ms_sql_2008_express_10" width="536" height="402" class="alignnone size-medium wp-image-1699" /></a></p>
<p>This window will then come up and show you the progress of your install. You will then be prompted to restart your computer. Tell it to restart again. Once you reboot it will come back to the installation screen and continue installing again. </p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_11.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_11.jpg" alt="" title="installing_ms_sql_2008_express_11" width="700" height="525" class="alignnone size-medium wp-image-1700" /></a></p>
<p>This screen will appear and test your machine to make sure it can run SQL 2008. If anything in here fails, it will need to be resolved before installation can continue.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_12.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_12.jpg" alt="" title="installing_ms_sql_2008_express_12" width="700" height="525" class="alignnone size-medium wp-image-1701" /></a></p>
<p>This screen is were you select what type of install you want to use but seeing as we downloaded the express edition that is already marked for us and it is all grayed out. Just go ahead and click next.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_13.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_13.jpg" alt="" title="installing_ms_sql_2008_express_13" width="700" height="525" class="alignnone size-medium wp-image-1702" /></a></p>
<p>This screen gives us the Terms of Service for SQL 2008. Read and understand these terms and check to box saying that you agree with them. Once you have done that, click on next to continue.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_14.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_14.jpg" alt="" title="installing_ms_sql_2008_express_14" width="700" height="525" class="alignnone size-medium wp-image-1703" /></a></p>
<p>This window shows you what needs to be installed for everything to work. Click on install to begin the process.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_15.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_15.jpg" alt="" title="installing_ms_sql_2008_express_15" width="700" height="525" class="alignnone size-medium wp-image-1704" /></a></p>
<p>This screen lets you pick extra features that you can install if you would like. For this tutorial I am selecting all of them. Click the select all button and then click next to continue.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_16.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_16.jpg" alt="" title="installing_ms_sql_2008_express_16" width="700" height="525" class="alignnone size-medium wp-image-1705" /></a></p>
<p>This screen lets you pick the name of the instance and where to put it. An instance name will allow you to install several different instances of SQL and call them independently. You can name it anything you would like. Click next to continue.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_17.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_17.jpg" alt="" title="installing_ms_sql_2008_express_17" width="700" height="525" class="alignnone size-medium wp-image-1706" /></a></p>
<p>This screen checks to ensure you have enough hard drive space for the installation to continue. Click next to continue.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_18.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_18.jpg" alt="" title="installing_ms_sql_2008_express_18" width="700" height="525" class="alignnone size-medium wp-image-1707" /></a></p>
<p>This window let’s you pick what account on your computer should run the service for the SQL server. Select the system account for the top service and make sure that both of them are set to automatic.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_19.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_19.jpg" alt="" title="installing_ms_sql_2008_express_19" width="700" height="525" class="alignnone size-medium wp-image-1708" /></a></p>
<p>This window lets you pick whether you want to authenticate users using windows authentication or using database credentials separately. Check the box that uses both and add you current user for the windows part and then type in the password twice that you want to be associated to the built-in database administrators account.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_20.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_20.jpg" alt="" title="installing_ms_sql_2008_express_20" width="700" height="525" class="alignnone size-medium wp-image-1709" /></a></p>
<p>This windows lets you select whether or not you would like to send error messages to Microsoft for reporting. You can also opt to send operating information to Microsoft to help them make better products. Click next and it will go through another system check to ensure more things are ready for the install. Click next on that screen as well.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_21.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_21.jpg" alt="" title="installing_ms_sql_2008_express_21" width="700" height="525" class="alignnone size-medium wp-image-1710" /></a></p>
<p>This window reviews all of the configuration options that we selected. Make sure everything looks the same as it should and then click next to finish the installation process.</p>
<p><a href="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_22.jpg"><img src="http://teamtutorials.com/wp-content/uploads/2008/11/installing_ms_sql_2008_express_22.jpg" alt="" title="installing_ms_sql_2008_express_22" width="700" height="525" class="alignnone size-medium wp-image-1689" /></a></p>
<p>This screen shows the installation process and will continue once the installation is completed. Click next to go to the final screen. The final screen gives you some information that may be helpful to you so read through it. Click on close once you are finished. I hope this tutorial was easy to follow and you learned from it. Next tutorial will walk you through configuring your database for access and creating the tables for it as well. </p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/database-tutorials/configuring-authentication-on-ms-sql-2008" title="Configuring Authentication on MS SQL 2008">Configuring Authentication on MS SQL 2008</a></li><li><a href="http://teamtutorials.com/database-tutorials/configuring-and-creating-a-database-in-ms-sql-2008" title="Configuring and Creating a Database in MS SQL 2008">Configuring and Creating a Database in MS SQL 2008</a></li><li><a href="http://teamtutorials.com/windows-tutorials/downloading-and-installing-heidi-sql" title="Downloading and Installing Heidi SQL">Downloading and Installing Heidi SQL</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/sending-e-mail-to-validate-user-sign-up" title="Sending E-Mail to validate User Sign-up">Sending E-Mail to validate User Sign-up</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/php-tutorials/creating-a-form-that-will-search-a-mysql-database" title="Creating a Form that will Search a MySQL Database">Creating a Form that will Search a MySQL Database</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/windows-tutorials/installing-microsoft-sql-2008-express-edition/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Simple VB Code and All About Arrays</title>
		<link>http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-vb-tutorials-%25e2%2580%2593-all-about-arrays</link>
		<comments>http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays#comments</comments>
		<pubDate>Mon, 18 Feb 2008 05:00:38 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays' addthis:title='Simple VB Code and All About Arrays' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This is one of the many tutorials that you can use to learn the basics of VB. These tutorials will help lay the groundwork so you can move on to more advanced programming. In this tutorial, we look at arrays and how they are used in VB programming. ]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays' addthis:title='Simple VB Code and All About Arrays' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>Arrays are a very useful part of VB programming and can be used for many different things. Arrays are a collection of variables that are all the same type. They can be as big or little as you need them to be. For example, lets say I need to use 5 numbers in one of my applications. Instead of using 5 different integers and I can use an integer array. The following code is dimming the array for use in the application (As mentioned in the previous tutorial(s) any variable that you want to be used by the whole application needs to be dimmed right under the Public Class for the form.):</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
Public Class frmArrays
    Dim intNumber(4) As Integer
End Class
</pre>
<p>Notice how the intNumber is followed by a number that is enclosed in parenthesis. This number tells the application how large to make the integer. By this I mean we can store 5 different numbers in the integer we just created. (0 counts as one – so 4 actually means five.)  To call then we simply put the number of the array we want to retrieve in those parentheses. Now that you know what an array is and what it does, let’s make an example and put it to use. Let’s make our form fist. As usual, I will show two forms, one with the names of the objects on the form, and one showing the normal text.</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/all_about_arrays_01.jpg' alt='All_About_Arrays_01' /></p>
<p>Note, you should make all of the text boxes in the lower portion ReadOnly. There is a ReadOnly setting in the properties. Set it to true.Now that we have our forms made, let’s being coding. As usual, let’s do our exit button first since it’s the easiest. Double-click on it and enter “End” as shown:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        End
    End Sub
</pre>
<p>Our next section of code is the add integer button. We are going to make it add the integer to the next available slot in the array. In order to do this we are going to use another single integer to determine how many times we have added an integer to our array. So we need to Dim the integer times under our Class for the form (as above):</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Dim intTries As Integer
</pre>
<p>Now we need to add the code that will actually check for the array to be used 5 times. Since the integer that we created (intTries) will be starting at zero, we need to stop it once it reaches 5. We also need to make sure that the characters entered into the textbox that we have are indeed only numbers. To do this we will use a neat feature built into VB 2005 and greater called TryParse. It automatically tries to parse the data in the textbox and will fail if it contains text:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
        If intTries = 5 Then
            MsgBox(&quot;Array is full! Time to show values.&quot;, MsgBoxStyle.Exclamation, &quot;Error!&quot;)
        Else
            If Integer.TryParse(txtInteger.Text, intNumber(intTries)) = False Then
                MsgBox(&quot;There are letters in the textbox, these cannot be added!&quot;, MsgBoxStyle.Exclamation, &quot;Numbers Only!&quot;)
            Else
                intTries = intTries + 1
            End If
        End If
        txtInteger.Text = &quot;&quot;
    End Sub
</pre>
<p>The first thing the code is doing is checking to make sure we have not reached the limit of our integer. It does this by checking our integer that we made. If it is it alerts the user that the array is full. If not it check the text box to see if there are any letters or punctuation in them. The code in that line is looking in the text box and sets the result to intNumber(intTries) – which in this case is intNumber(0). If there are no letters it will simply set it to whatever is in the textbox. If there are letters it will set it to zero. Our code only increments intTries up by one IF the textbox contains only number. The next time around it will be storing the integer to intNumber(intTries) again but this time it will be equal to intNumber(1).  Lastly it blanks out our textbox for entry of another number. Now we need to set the code to show the array in our text boxes that we made on the bottom part of the form. </p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdShow.Click
        txtInteger1.Text = intNumber(0)
        txtInteger2.Text = intNumber(1)
        txtInteger3.Text = intNumber(2)
        txtInteger4.Text = intNumber(3)
        txtInteger5.Text = intNumber(4)
        MsgBox(&quot;Integers need reset. Please click reset array to start over.&quot;, MsgBoxStyle.Exclamation, &quot;Complete!&quot;)
    End Sub
</pre>
<p>All this code does is set the text of the textbox equal to one of the integers in the array and alerts the user to reset the array before trying to add more integers to it. Now the last thing we need to do is add the code to the clear button. </p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClear.Click
        intTries = 0
        intNumber(0) = 0
        intNumber(1) = 0
        intNumber(2) = 0
        intNumber(3) = 0
        intNumber(4) = 0
        txtInteger1.Text = &quot;&quot;
        txtInteger2.Text = &quot;&quot;
        txtInteger3.Text = &quot;&quot;
        txtInteger4.Text = &quot;&quot;
        txtInteger5.Text = &quot;&quot;
    End Sub
</pre>
<p>This sets all integers back to zero and blanks out all of the text boxes on the bottom part of the form. This concludes the code we need to write. In the next tutorials I will show you how to prevent writing a 0 to each integer by using a Do, While statement to get it done easier. Now, let’s test our program. If you type in numbers and letters into the box and hit add to array you should see the following:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/all_about_arrays_02.jpg' alt='All_About_Arrays_02' /></p>
<p>Now you should be able to add integers to it until you get the following box to alert you that it is full:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/all_about_arrays_03.jpg' alt='All_About_Arrays_03' /></p>
<p>One the array is full we should now be able to show the contents of it in our boxes below. Click on Show Ints. to populate the boxes and you will get this reminder:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/all_about_arrays_04.jpg' alt='All_About_Arrays_04' /></p>
<p>Once you click away you should see the integers that you typed in as shown below:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/all_about_arrays_05.jpg' alt='All_About_Arrays_05' /></p>
<p>Now that you have seen them all you should be able to hit clear and start all over again. This concludes this tutorial and thank-you for reading.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/windows-tutorials/eliminating-viruses-with-avg-free-edition" title="Eliminating Viruses with AVG Free Edition">Eliminating Viruses with AVG Free Edition</a></li><li><a href="http://teamtutorials.com/windows-tutorials/speed-up-your-pc-by-increasing-page-file-size" title="Speed Up Your PC by Increasing Page File Size">Speed Up Your PC by Increasing Page File Size</a></li><li><a href="http://teamtutorials.com/off-topic/launch-of-wootstat-the-top-woot-tracker-on-facebook" title="Launch of WootStat &#8211; The Best Woot Tracker on Facebook">Launch of WootStat &#8211; The Best Woot Tracker on Facebook</a></li><li><a href="http://teamtutorials.com/windows-tutorials/set-windows-xp-program-access-and-defaults" title="Set Windows XP Program Access and Defaults">Set Windows XP Program Access and Defaults</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/sending-e-mail-to-validate-user-sign-up" title="Sending E-Mail to validate User Sign-up">Sending E-Mail to validate User Sign-up</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/simple-vb-tutorials-%e2%80%93-all-about-arrays/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple VB Code with Strings Booleans and Integers</title>
		<link>http://teamtutorials.com/programming-tutorials/simple-vb-code-strings-booleans-and-integers?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-vb-code-strings-booleans-and-integers</link>
		<comments>http://teamtutorials.com/programming-tutorials/simple-vb-code-strings-booleans-and-integers#comments</comments>
		<pubDate>Mon, 11 Feb 2008 05:00:19 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/programming-tutorials/simple-vb-code-strings-booleans-and-integers</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/simple-vb-code-strings-booleans-and-integers' addthis:title='Simple VB Code with Strings Booleans and Integers' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This is the third tutorial in the series that will give you a very basic understanding of VB and allow you to learn more advanced features. We are going to be going over strings, integers, and boolean variables.]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/simple-vb-code-strings-booleans-and-integers' addthis:title='Simple VB Code with Strings Booleans and Integers' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>In this tutorial we are going to learn to use strings, Booleans, and Integers to check for more specific features before events can happen. An Integer is a type of variable that can only contain numbers. A string is a variable that can text and numbers. Strings must be enclosed in quotation marks when setting them. A Boolean is a variable that is either true of false. In order to use these variables in our applications we need to “dimensionalize” (Dim in VB) them to be ready. By using dim we tell the application what the name of it is and what type of variable it is. The naming convention should be the same as the controls in our last tutorials (three letter abbreviations, followed by a descriptive name), such as strString ,intInteger, and booBoolean. Dim need to be made directly under the Class set in the code. Puttin them here allows all Sub routines to be able to call them. If you were to dim on during a Sub it wont only be able to be used during that particular sub. The ones that I am Dim’ing are shown below:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
Public Class frmLogin
    Dim strUser As String
    Dim strPassword As String
    Dim intAttempts As String
    Dim booLogin As Boolean
</pre>
<p>As shown above, you can see that we are going to use two strings (User and Password). We also have an integer (Attempts) and a Boolean (Login). What we are going to do is make a login page that after trying to log in three times pops a message saying that the maximum number of attempts has been reached and the application will now be terminated. If you log in correctly you will get a login successful message box. Note: If you are planning on making an application that authenticates people – this is NOT the method to do that as we are going to put the password directly in the code. This way anyone can open the .exe in a resource editor/hex editor and plainly see the password. </p>
<p>Next, we need to set the string equal to what we want the password and username to be. We will set this on form load. To get the form load code section double-click on the title bar of the form.  For this tutorial we are making the username Mike and the password TeamTutorials (it will be case sensitive).</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        strPassword = &quot;TeamTutorials&quot;
        strUser = &quot;Mike&quot;
    End Sub
</pre>
<p>Next we need to lay out our form. I will have two pictures (one for the names of the controls and on for the text that are in the controls):</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_01.jpg' alt='Strings_Booleans_and_Integers_01' /></p>
<p>Now, let’s start adding out code to the form. Double click on the exit button and add the word End to it. This will kill the application when clicked:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        End
    End Sub
</pre>
<p>The next thing we need to put in the code is the checking to see if the username and password entered match what we have. We also want to check to make sure the password box is not blank, and if it is alert the user to it. The username can be blank. </p>
<p>(Please note that I did this in a way that will make you understand how the If statements work in order to get this tutorial. There are many easier ways to achieve this and there are parts of the code that are un-needed. For example, the Boolean is completely useless and does not need to be there, but I wanted you to see its function.)</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click
        If txtPassword.Text &lt;&gt; &quot;&quot; Then
            If txtUser.Text = strUser Then
                If txtPassword.Text = strPassword Then
                    booLogin = True
                    If booLogin = True Then
                        MsgBox(&quot;Succesfully logged in!&quot;, MsgBoxStyle.Information, &quot;Welcome&quot;)
                        txtPassword.Text = &quot;&quot;
                        txtUser.Text = &quot;&quot;
                        booLogin = False
                    End If
                Else
                    MsgBox(&quot;Password is incorrect, please try again.&quot;, MsgBoxStyle.Information, &quot;Incorrect Password!&quot;)
                    txtPassword.Text = &quot;&quot;
                End If
            Else
                MsgBox(&quot;Username is incorrect, plaese try again.&quot;, MsgBoxStyle.Information, &quot;Incorrect Username!&quot;)

            End If
        Else
            MsgBox(&quot;Please enter a password!&quot;, MsgBoxStyle.Information, &quot;Alert!&quot;)
        End If
    End Sub
</pre>
<p>The code above is actually very simple. Just the fact that there are if statement in if statements (nested if statements) makes it confusing to look at. Here is a picture to help line up the if statements and make it a little easier to understand:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_02.jpg' alt='Strings_Booleans_and_Integers_02' /></p>
<p>We simply check to make sure the password text box is not empty, then we check to make sure the user name equals what it should and if it doesn’t give a message box. Then we check to make sure the password equals or preset one and if not give a message box. If it matches it sets our Boolean equal to false. Then we check to see if the Boolean is equal to true and give the welcome message box if it is. After we log in successfully we blank out both of the text boxes and set the Boolean back to false.</p>
<p>One last thing, since this is a password field, we should make it so that the password comes up as asterisks as the user types it so that other around wont be able to read what the password is. To do this we simply need to click on the text box that we want to do that to and locate the following property in the property toolbar:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_03.jpg' alt='Strings_Booleans_and_Integers_03' /></p>
<p>and type the asterisk. You can use whatever you would like instead of the asterisk as well. Now let’s test everything. To start run the application and type the username with no password in the box and you should get the following window: </p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_04.jpg' alt='Strings_Booleans_and_Integers_04' /></p>
<p>Next type anything in for the password but type the user name incorrectly and you should receive the following box:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_05.jpg' alt='Strings_Booleans_and_Integers_05' /></p>
<p>Next type the username correctly but type the password in correctly and you should get this box instead:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_06.jpg' alt='Strings_Booleans_and_Integers_06' /></p>
<p>Finally, type the username and password both in correctly and you should receive our final box that says this all was a success:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/strings_booleans_and_integers_07.jpg' alt='Strings_Booleans_and_Integers_07' /></p>
<p>This concludes this tutorial. I hope this makes If statements something you can easily understand now. I hope you were able to follow it and thanks for reading.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/windows-tutorials/retrieving-xp-cd-key-from-the-registry" title="Retrieving XP CD-Key from the Registry">Retrieving XP CD-Key from the Registry</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/simple-php-website-templates" title="Simple PHP Website Templates">Simple PHP Website Templates</a></li><li><a href="http://teamtutorials.com/windows-tutorials/disable-visual-effects-to-speed-up-windows-xp" title="Disable Visual Effects to Speed Up Windows XP">Disable Visual Effects to Speed Up Windows XP</a></li><li><a href="http://teamtutorials.com/photoshop-tutorials/recreate-the-diggcom-header" title="Recreate the Digg.com Header">Recreate the Digg.com Header</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/install-wordpress-using-fantastico-in-cpanel" title="Install Wordpress using Fantastico in cPanel">Install Wordpress using Fantastico in cPanel</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/simple-vb-code-strings-booleans-and-integers/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple VB Code with Command Buttons</title>
		<link>http://teamtutorials.com/programming-tutorials/simple-vb-code-command-buttons?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-vb-code-command-buttons</link>
		<comments>http://teamtutorials.com/programming-tutorials/simple-vb-code-command-buttons#comments</comments>
		<pubDate>Thu, 07 Feb 2008 01:00:57 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/programming-tutorials/simple-vb-code-command-buttons</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/simple-vb-code-command-buttons' addthis:title='Simple VB Code with Command Buttons' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This is the second tutorial in the beginners tutorials that will give you a basic insight into VB programming and lay the groundwork for you to be able to understand more advanced concepts. We will be working with modifying forms using command buttons.]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/simple-vb-code-command-buttons' addthis:title='Simple VB Code with Command Buttons' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>In this tutorial we will look into changing other controls in the command of varying buttons. I am trying to keep these VB tutorials quick and simple so that they are easy to understand and you are able to do this stuff enough to be able to remember it. First we need to create the form. I will post two pictures, one of the form showing what I called all the controls on the form, and one that shows the text that I applied to each one. In this tutorial I will be using panels to show the changes made. Since panels contain no text I can’t put their names on them. I simply named them pnlXXXX (where XXXX is the same as the button below it Ex. The one on the left is pnlSize). </p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_2_01.jpg' alt='Basic_VB_Programming_2_01' /></p>
<p>Note: Make sure you make all 4 of the panels have a border style of FixedSingle under the properties menu. Now we can start adding the code to make these buttons do the changes we want to make. First lets program the exit button as it is the most simple to do. Remember, to start programming for a button, all we need to do is double-click on it in the GUI section. So, let’s double click on our Exit button and add the word “End” to it as below:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        End
    End Sub
</pre>
<p>Next we need to program the first panel to first change to a smaller size when we first click the button and then change back to normal when we click it again. To differentiate between which mode it is in we will use and if statement to check its current size. Double click on the Change Size button to start adding the code. All of my panels are a size of : “66, 32” – Shown as Width, Height. Add the code as shown below:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdSize_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSize.Click
        If pnlSize.Width = 66 Then
            pnlSize.Width = 33
        Else
            pnlSize.Width = 66
        End If
    End Sub
</pre>
<p>The code simply checks to see if the panel is at its current width of 66 pixels and if it is, it changes it to 33 pixels. If it’s not at 66 it must be 33 pixels and sets it back to 66. Next we need to code our color changing button. Note: Please set this panel’s backcolor property to Red (once you clikc backcolor an option menu will come up, select the web optioni and go to red)before putting in the code. We are going to make this a little trickier by throwing in and ElseIf statement. I will explain after I show you the code:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdColor.Click
        If pnlColor.BackColor = Color.Red Then
            pnlColor.BackColor = Color.Blue
        ElseIf pnlColor.BackColor = Color.Blue Then
            pnlColor.BackColor = Color.Orange
        Else
            pnlColor.BackColor = Color.Red
        End If
    End Sub
</pre>
<p>This code is the same as the If statement that we had before in our previous tutorial but we added one more condition. This time the application checks to see if the box has the backcolor of red(If) and if it does it changes it to blue. If it is not Red then it checks to see if it is blue (Else If) and if it is it changes it to orange. If it is not red or blue it changes it to red (Else). This way it will make a continuous loop from Red to Blue  to Orange. Our next button is going to change the border type of our panel. This is the code that should be place within the sub after double-clicking on the button:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdBorder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBorder.Click
        If pnlBorder.BorderStyle = BorderStyle.FixedSingle Then
            pnlBorder.BorderStyle = BorderStyle.Fixed3D
        ElseIf pnlBorder.BorderStyle = BorderStyle.Fixed3D Then
            pnlBorder.BorderStyle = BorderStyle.None
        Else
            pnlBorder.BorderStyle = BorderStyle.FixedSingle
        End If
    End Sub
</pre>
<p>This code is similar to our previous button except we are doing it with borders. There are three types of border (well, two really and then no border). This section of code is checking to see if our panel has a borderstyle of FixedSingle (which is how it is starting) and if it is, sets it to have a style of Fixed3D (If). If it is not Fixedsingle it checks to see if it is Fixed3D, and changes it to none if it is (Else IF). If it is not FixedSingle or Fixed3D it changes it to FixedSingle (Else) Our next and last button is going to change the visibility of the form (Make is visible or not). Here is the code:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdVisible_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdVisible.Click
        If pnlVisible.Visible = True Then
            pnlVisible.Visible = False
        Else
            pnlVisible.Visible = True
        End If
    End Sub
</pre>
<p>This code is not different from our others really. Visibility is known as a Boolean Type. It is either true or false. It is checking to see if the panel’s visibility is currently set to true and if it is it sets it to false, otherwise it sets it to true. This should conclude the code of the tutorial. You should no be able to run the application and the button will make the panels do their respective tasks. If you have any questions please comment. Thanks for viewing. </p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/photoshop-tutorials/ufc-blood-sport-logo" title="UFC Blood Sport Logo">UFC Blood Sport Logo</a></li><li><a href="http://teamtutorials.com/database-tutorials/configuring-authentication-on-ms-sql-2008" title="Configuring Authentication on MS SQL 2008">Configuring Authentication on MS SQL 2008</a></li><li><a href="http://teamtutorials.com/windows-tutorials/complete-elimination-of-viruses-and-spyware-disabling-system-restore" title="Complete Elimination of Viruses and Spyware (Disabling System Restore)">Complete Elimination of Viruses and Spyware (Disabling System Restore)</a></li><li><a href="http://teamtutorials.com/site-news/update-new-syntax-highlighting-feature" title="Update: New Syntax Highlighting Feature">Update: New Syntax Highlighting Feature</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/password-verification-and-strength-checker" title="Password Verification and Strength Checker">Password Verification and Strength Checker</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/simple-vb-code-command-buttons/feed</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Basic VB Code – Changing Text</title>
		<link>http://teamtutorials.com/programming-tutorials/basic-vb-code-%e2%80%93-changing-text?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-vb-code-%25e2%2580%2593-changing-text</link>
		<comments>http://teamtutorials.com/programming-tutorials/basic-vb-code-%e2%80%93-changing-text#comments</comments>
		<pubDate>Sun, 03 Feb 2008 02:51:04 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/programming-tutorials/basic-vb-code-%e2%80%93-changing-text</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/basic-vb-code-%e2%80%93-changing-text' addthis:title='Basic VB Code – Changing Text' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This is the first of a series of tutorials to get you learning VB. These tutorials are going to teach you the very basics of VB programming and allow you to be able to learn more advanced features and coding.]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/basic-vb-code-%e2%80%93-changing-text' addthis:title='Basic VB Code – Changing Text' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p>In this tutorial we will be looking at some of the more common, easy to use controls/functions of VB. We are going to create a simple form and update it using other information that is provided by the user. When making forms it is a good practice to name all of the controls and labels on the form in a manner in which you can remember. This will allow for easy debugging if something were to go wrong and/or needs to have a code change made. For example, I typically take the word that the command is like such as a button and turn it into a three letter acronym such as BTN. This way when scrolling through all of my objects I can automatically go to all of my buttons. Personally, I start all of my buttons with CMD as they generally “command” things to happen. So If I had a login form, everything would be named as shown below :</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_01.jpg' alt='Basic_VB_Programming_01' /></p>
<p>As you can see my Text Boxes are name txtXXXXX, my Form is name frmMain, my Buttons are named cmdXXXXX and my Labels are named lblXXXXX. This is not 100% necessary but it will make life easier once you start getting into hundreds and then thousands of lines of code. </p>
<p>To start, the screen shot below shows the properties windows when a button is selcted.</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_02.jpg' alt='Basic_VB_Programming_02' /></p>
<p>All of the things listed in the column above can be modified during run time. By this, I mean that the configuration of the button can be changed using code after a certain event happens, for example: by clicking on a button we can change the text of a label to the contents of a text box that we have on the form. To call these features, you type the name of the control (ex. cmdExit) and then a period and type the name of the property you want to change. This brings us to our first form that we are going to create. Create the form as shown below: (for the sake of the tutorial, I am making two pictures, one that uses the “text field” to show the name of all the items on the form so that you can name yours the same way so the code will work, and the second to show what that actual “text field” of the item is.)</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_03.jpg' alt='Basic_VB_Programming_03' /></p>
<p>One you have everything named, we need to start adding our code. To start, double-click on the Exit button. It will automatically open your code viewer/editor and add the Sub Name and End Sub commands. Whatever you type between these fields will be run every time the exit button is clicked. The command for and Exit button is usually simple. Just type “End”. You should see this:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        End
    End Sub
</pre>
<p>All this code does is kill the application if the Exit button is pressed. The end command kills the application and releases all system memory used to store the applications procedures. Next we need to add the code to the Change Text button to make the text of the label change to whatever text is in the text box provided. Double-click on the Change Text button for it to auto generate the opening code. Then type in the following code:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
    Private Sub cmdChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdChange.Click
        If txtText.Text &lt;&gt; &quot;&quot; Then
            lblText.Text = txtText.Text
            txtText.Text = &quot;&quot;
        Else
            MsgBox(&quot;The textbox is blank. Please enter text into it. Thank-you.&quot;, MsgBoxStyle.Information, &quot;No Text&quot;)
        End If
    End Sub
</pre>
<p>Let’s break this code down a little bit to help understand what is going on. The first line:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
If txtText.Text &lt;&gt; &quot;&quot; Then
 </pre>
<p>Is setting up the “If, Then” statement. It says If the text in txtText is not equal to (<> means not equal to) “” (blank) then do the following (anytime you are using a string (actual text that will be displayed as it is) you need to enclose it in quotes):</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
lblText.Text = txtText.Text
txtText.Text = &quot;&quot;
</pre>
<p>These two lines are run on if the if statement is true. The first line is setting the label equal to whatever text is shown in the textbox. The second line is setting the textbox back to “” (blank). Then we have to tell it what to do incase the If statement is false. To do this we will need to use the else statement as shown below:</p>
<pre class="brush: vb; title: Code Snippet:; notranslate">
        Else
            MsgBox(&quot;The textbox is blank. Please enter text into it. Thank-you.&quot;, MsgBoxStyle.Information, &quot;No Text&quot;)
        End If
 </pre>
<p>This code simple says that if the If statement is false, show a message box with the text “The textbox is blank. Please enter text into it. Thank-you.” , with the formatting of a System Information box, with the title of “ No Text”. This will alert the user that the textbox was empty and we don’t want to make the label blank. It also uses “End If” to tell the app that it is the end of the If statement. Now we should be able to test the application by pressing the “play” button. . Type “I want to change the text of the label to this!!&#8221; into the textbox:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_04.jpg' alt='Basic_VB_Programming_04' /></p>
<p>As soon as you hit the change text button the label should change to what we typed in and the textbox should become empty again as shown:</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_05.jpg' alt='Basic_VB_Programming_05' /></p>
<p>You should now be able to click on Change Text again to see our error message since the text box is empty.</p>
<p><img src='http://teamtutorials.com/wp-content/uploads/2008/02/basic_vb_programming_06.jpg' alt='Basic_VB_Programming_06' /></p>
<p>Now if you click exit it should kill the application. You have now completed the first tutorial in the basic VB programming series. Please check back for more. Thank-you for viewing. Please comment if you have any question or recommendation of what you would like to see.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/site-news/back-to-cpanel-10" title="Back to cPanel 10">Back to cPanel 10</a></li><li><a href="http://teamtutorials.com/software-tutorials/how-to-mount-an-image-to-a-virtual-drive" title="How to Mount an Image to a Virtual Drive">How to Mount an Image to a Virtual Drive</a></li><li><a href="http://teamtutorials.com/windows-tutorials/create-a-virtual-machine-for-testing-operating-systems" title="Create a Virtual Machine for Testing Operating Systems">Create a Virtual Machine for Testing Operating Systems</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/javascript-progress-bar-2" title="JavaScript Progress Bar 2">JavaScript Progress Bar 2</a></li><li><a href="http://teamtutorials.com/windows-tutorials/sharing-a-printer-on-a-windows-network" title="Sharing a Printer on a Windows Network">Sharing a Printer on a Windows Network</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/basic-vb-code-%e2%80%93-changing-text/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Build your first application with VB Express 2005</title>
		<link>http://teamtutorials.com/programming-tutorials/build-your-first-application-with-vb-express-2005?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-your-first-application-with-vb-express-2005</link>
		<comments>http://teamtutorials.com/programming-tutorials/build-your-first-application-with-vb-express-2005#comments</comments>
		<pubDate>Thu, 06 Sep 2007 06:54:18 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/programming-tutorials/build-your-first-application-with-vb-express-2005</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/build-your-first-application-with-vb-express-2005' addthis:title='Build your first application with VB Express 2005' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>Unfamiliar with Visual Basic 2005? This tutorial will walk you through making a very simple application. You will learn how to build the application for deployment and how to use it after you are completed. ]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/build-your-first-application-with-vb-express-2005' addthis:title='Build your first application with VB Express 2005' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Once you have installed VB Express 2005 using this tutorial: <a href="http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition" title="VB Install" target="_blank">VB Install</a>, you can start to build your applications. We will start with a few minor features of VB to make a very primitive application and create an EXE from it.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">First, we need to launch VB Express 2005 to get to the Start Page shown below:<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_01.JPG" title="build_a_vb_app_01"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_01.thumbnail.JPG" alt="build_a_vb_app_01" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This is the “home page” of VB Express. This will give you news and updates, and allows you to start or open a project to be worked on.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_02.JPG" alt="build_a_vb_app_02" /><span style="font-size: 11pt"><o> </o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Click on the hyperlinked Project button to begin building a new project.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_03.JPG" title="build_a_vb_app_03"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_03.thumbnail.JPG" alt="build_a_vb_app_03" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">The above window will appear, asking you to name your project and to select what kind of project it is going to be. For this tutorial, we are going to use the generic Windows Application selection, and call it “Build”.</span><span>  </span><o></o></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_04.JPG" title="build_a_vb_app_04"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_04.thumbnail.JPG" alt="build_a_vb_app_04" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This is the main development interface. If you get big into VB programming, this will be like home. </span><span style="font-size: 11pt; font-family: Wingdings"></span><span></span><span style="font-size: 11pt">The main parts of this interface are detailed below.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_05.JPG" alt="build_a_vb_app_05" /></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">First, we have the toolbox. This is where you visually pick what you want to put on your form (the application). You will see common thing suck as buttons, text boxes, labels, and more. These items all describe themselves fairly well. To put them on a form you select one, then click (and drag if you can choose the size) on the form where you would like it to go. You can move and resize them after they are on the form, so it doesn’t have to be perfect now.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_06.JPG" title="build_a_vb_app_06"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_06.JPG" alt="build_a_vb_app_06" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This is the section where the GUI(Graphical User Interface) is displayed when you are working on the Front end, and where the code is displayed when you are working on the code. As you can see, it is tab driven which allows you to have multiple screens, forms, and code listing open all at once.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_07.JPG" alt="build_a_vb_app_07" /></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Next we have the solution explorer. (This is usually set to only appear when you move your mouse to the right side of the screen; it will then slide out for you to see it. If you want it like I have it, you can click on the push pin icon at the top to make it stay in place.) This allows you to see all the scripts, icons, forms, and controls that are in your project. All we have now is our main form. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_08.JPG" alt="build_a_vb_app_08" /><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Last, but definitely not least, we have the Properties windows. This window shows you all of the options for whatever you have selected in the graphical interface. For example, if I had selected a label, I would see all of the configurable options for a label like: name, text (shown on the screen), font size, color, background color, and size. As you select the option to modify it, it will give you a description of what it does or what it modifies in the box at the bottom of the window. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_09.JPG" alt="build_a_vb_app_09" /><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Next, we want to start building our form. When you place things on to the form in the future, you will want to remember to have a naming convention to follow, so you will be able to remember what you called things. I usually make an abbreviation for the type of object it is. For example, I will call text box that collects a user name “txtUser” or a label that showed the user name “lblUser”. After you place the label, look at the property window, it will now show you the option of “Text”. Click on it an type in “The button has been pressed” for the first one and “times” for the second one. For this tutorial don’t change anything else. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_10.JPG" title="build_a_vb_app_10"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_10.thumbnail.JPG" alt="build_a_vb_app_10" /></a><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Next, we want to double click on the button that we placed on the form. This will take you to the code view and automatically set you up to start writing the code. Private_Sub Button1_Click tells you the name of the “section” of code. All of the stuff after it (ByVal ect….) for the sake of this tutorial, can be ignored. You will most likely not have to modify it in any basic programming that you do. The two cells at the top of the page show you what object you are writing code for (on the left) and what command, or action will trigger that code (on the right). So, in this case we are writing code that will be executed when Button1 is clicked. The bottom of this screen shows you if you have any errors in the code that you have typed and will alert you to where they are. It will also try to help you figure out why it is wrong. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_11.JPG" title="build_a_vb_app_11"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_11.thumbnail.JPG" alt="build_a_vb_app_11" /></a><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This is all the code we will need to make this application function. Lets break down some of this code:<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">“Public Class Form1” – This indicates that everything from this point, until the “End Class” code is for Form1. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">“Dim stramount as integer” – This gets a word ready to be used as a variable of some sort. In this case I have made it an integer, as it will only and always be a number. These have to go right after the Class command or they will not be available from all Subs. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">“If, Else, End If.” – This is one of the most common and basic commands in VB. It simply tells it to check something, and if it is true do option a, and if its not, do option b. In this case, we are checking for stramount to be equal to 99 and if it is to alert the user with a message box, so that they know they have reached the limit of the textbox I made. If stramount is not equal to 99 it simply makes stramount equal to itself plus one (adds one to the value of stramount.).<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">“Textbox1.text = stramount” – this makes the textbox that we made show the value of the integer. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">So, every time the button is clicked, it checks the value of stramount, runs the code based on its result, and finally updates the textbox with the value. <o></o></span></p>
<p class="MsoNormal"><span style="font-size: 11pt"><o> </o></span></p>
<p style="text-align: center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_12.JPG" alt="build_a_vb_app_12" /></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This control bar at the top of the screen allows you to Undo code and object changes, redo code and object chngaes, start debugging (run the application) pause debugging, and stop debugging. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_13.JPG" alt="build_a_vb_app_13" /><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Click on Start Debugging to launch the application. It will show us our form. Press the button and the box should change to 1. Press it again and it should increase. It will continue to increase until it reaches 99 and you press it again, you will then see this: <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_14.JPG" alt="build_a_vb_app_14" /><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Now that it works the way we want to, we want to build it so that we can give it to other people to use. First go to Build</span><span style="font-size: 11pt; font-family: Wingdings"></span><span>&gt;</span><span style="font-size: 11pt">Build (App Name), to make sure the application can successfully create the exe. Once that completes, goto Build</span><span style="font-size: 11pt; font-family: Wingdings"></span><span>&gt;</span><span style="font-size: 11pt">Publish (App Name). The following windows will come up.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_15.JPG" title="build_a_vb_app_15"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_15.thumbnail.JPG" alt="build_a_vb_app_15" /></a><span style="font-size: 11pt"></span><span> </span><o></o></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This window allows you to pick were you want to build the application at. I usually put a folder on the desktop for my builds, at least until I’m done with them. To do this, click on browse:<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_16.JPG" title="build_a_vb_app_16"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_16.thumbnail.JPG" alt="build_a_vb_app_16" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">You will get this window. Select Desktop at the top of the tree view dialog. Then add the name of what you want to call the folder onto the end of the address. Click on Open.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_17.JPG" title="build_a_vb_app_17"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_17.thumbnail.JPG" alt="build_a_vb_app_17" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">You will be prompted to Create the folder. Click Yes. Once you do this, it will take you back to the original screen. Click on Finish to build the project. Once it finished building you should then see the folder you called it on your desktop. Open this folder.<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_20.JPG" title="build_a_vb_app_20"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_20.thumbnail.JPG" alt="build_a_vb_app_20" /></a><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">Inside this folder, you will see the above contents. There are two ways of running your application. First you can run the “setup.exe”. Or you can just run the EXE. I will cover both. First, the setup. Click on “setup.exe” to launch the application installation. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_18.JPG" title="build_a_vb_app_18"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_18.thumbnail.JPG" alt="build_a_vb_app_18" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">This window will pop up to alert you that you are about to install and unknown publishers application. Of course it’s unknown, Microsoft doesn’t know you personally. Click on install to continue with the install and it will finish automatically. Once it is done, it will automatically launch the application. If you go to your Start Menu, you will see that a folder has been created for you application. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt"><o> </o></span><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_19.JPG" title="build_a_vb_app_19"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_19.thumbnail.JPG" alt="build_a_vb_app_19" /></a></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">You will also notice that it is in the Add/Remove programs in the Control Panel:<o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><a href="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_23.JPG" title="build_a_vb_app_23"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_23.thumbnail.JPG" alt="build_a_vb_app_23" /></a><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">The second method is to run the EXE without creating/installing all the other stuff. In order to do this, simply go back to the folder on the desktop and go into the folder called Build_1_0_0_0. It will be different every time, but there will always be a folder there. Once you go into it you will see a file that looks like this:<o> </o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_21.JPG" alt="build_a_vb_app_21" /><span style="font-size: 11pt"><o><br />
</o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 11pt">If you don’t see the .deploy at the end, follow <a href="http://teamtutorials.com/windows-tutorials/show-file-extension-in-windows-xp" title="this tutorial" target="_blank">this tutoral</a>, to ensure you are showing file extensions of known files. Simply remove the .deploy and then you can run the application with the EXE. You can now put it anywhere on your hard drive and run it. <o></o></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><img src="http://teamtutorials.com/wp-content/uploads/2007/09/vb_build_22.JPG" alt="build_a_vb_app_22" /><o><br />
</o></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/programming-tutorials/function-splitting-a-string" title="Function &#8211; Splitting a string">Function &#8211; Splitting a string</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/hide-and-show-a-div-using-javascript" title="Hide and Show a Div Using Javascript">Hide and Show a Div Using Javascript</a></li><li><a href="http://teamtutorials.com/windows-tutorials/disable-visual-effects-to-speed-up-windows-xp" title="Disable Visual Effects to Speed Up Windows XP">Disable Visual Effects to Speed Up Windows XP</a></li><li><a href="http://teamtutorials.com/windows-tutorials/schedule-windows-to-automatically-restart" title="Schedule Windows to Automatically Restart">Schedule Windows to Automatically Restart</a></li><li><a href="http://teamtutorials.com/other-tutorials/disable-uacuser-access-control-in-windows-vista" title="Disable UAC(User Access Control) in Windows Vista">Disable UAC(User Access Control) in Windows Vista</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/build-your-first-application-with-vb-express-2005/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Visual Basic 2005 Express Edition</title>
		<link>http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-visual-basic-2005-express-edition</link>
		<comments>http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition#comments</comments>
		<pubDate>Sat, 28 Apr 2007 01:48:08 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Visual Basic 2005/2008]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition' addthis:title='Installing Visual Basic 2005 Express Edition' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div>This tutorial walks you through the process of installing Visual Basic 2005 Express edition. This will allow to learn to create applications.]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style" addthis:url='http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition' addthis:title='Installing Visual Basic 2005 Express Edition' ><a class="addthis_button_print"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_facebook"></a><a class="addthis_button_stumbleupon"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_compact"></a></div><p class="MsoNormal">Have you ever wanted to learn to program, but just never had the time or money to invest in programming applications? Well Microsoft released a version of their programming apps for free.</p>
<p class="MsoNormal"><o> </o>In this tutorial, we are going to walkthrough installing VB 2005 Express Edition from Microsoft so that you can try to learn VB to help your create some applications. After that you can continue on to the next tutorial to familiarize yourself with the interface.</p>
<p class="MsoNormal"><o> </o>Many people feel that VB is dumb language to learn because it is slow. Well while VB is slow, I feel that VB can give you a good understanding of how programming works, which will help you learn more advanced languages, such as C++ or Java.</p>
<p class="MsoNormal">Now then, let’s get started:</p>
<p class="MsoNormal">Go to the following link: <a href="http://msdn.microsoft.com/vstudio/express/vb/" title="Get VB Express!!" target="_blank">http://msdn.microsoft.com/vstudio/express/vb/</a> to download click on the download button at the top of the page, that is shown below:</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-011.JPG" alt="installation-of-vb-express-01.jpg" /></p>
<p class="MsoNormal">Next, a window displaying the programming languages will be displayed. Pick English within the Visual Basic 2005 Window as shown below:</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-02.JPG" alt="installation-of-vb-express-02.jpg" /><br />
Next, the download box comes up (if you are using IE you may have to tell it to allow the file to be downloaded, by clicking on the bar at the top and clicking on “Allow File”), click on run to download the file to a temp folder. The file we are downloading is not actually the application; it is a tool that will download the application for us. Once done downloading you will most likely see this:</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-03.JPG" alt="installation-of-vb-express-03.jpg" /><br />
Click on run to begin the installation and downloading of VB. Once the file is done unpacking, it will launch the following screen:</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-04.JPG" alt="installation-of-vb-express-04.jpg" /><br />
This window just welcomes us to the setup. If you would like to send anonymous information about your setup to MS, go ahead and check that box. It will send info such as, hardware specs, time taken to install, options selected, and ect. Click on next when we are ready to continue.</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-05.JPG" alt="installation-of-vb-express-05.jpg" /><br />
This is the EULA window. Scroll through it or print it out to read through later. Check the box that says you accept and then click on next.</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-06.JPG" alt="installation-of-vb-express-06.jpg" /><br />
This allows us to check what addition optional components we would like installed. The top one will download the entire MSDN Library(help files) to your computer. I think this is unnecessary b/c the entire MSDN files are available through the web help. It integrates web help into the help within the application, so you really don’t benefit from it. The bottom will download files to operate an SQL server to try out programs that use a database. If you don’t feel that you will ever want to do that, then don’t download it. Once you are ready to continue, click on next.</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-07.JPG" alt="installation-of-vb-express-07.jpg" /><br />
This window allows us to tell the installer where to put the system files. Also it reminds you to be connected to the internet before continuing. Once ready, click on next to continue.</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-08.JPG" alt="installation-of-vb-express-08.jpg" /><br />
This window is the downloading window. This will download all needed components and then continue with the installation. Once there are all check marks underneath the left column you can disconnect from the internet. Once the downloads complete, it will begin installing the application(s). It may need to reboot several times during installation. It will automatically resume installation once a reboot has been completed.</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-09.JPG" alt="installation-of-vb-express-09.jpg" /><br />
Upon restarting, you might see this window before it starts installing again : This is normal. Once the install is completed you will see the following:</p>
<p class="MsoNormal"><img src="http://teamtutorials.com/wp-content/uploads/2007/04/installation-of-vb-express-10.JPG" alt="installation-of-vb-express-10.jpg" /><br />
This window gives you the chance to register now. Registration is free and MUST be done within 30 days or the software will de-activate. They just require your name, e-mail, and address. Once you are done, click on finish, and then you are ready to begin using the app. Thank-you for viewing this tutorial.
</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/web-development-tutorials/convert-a-mysql-date-field-using-php-functions" title="Convert a MySQL date field using PHP Functions">Convert a MySQL date field using PHP Functions</a></li><li><a href="http://teamtutorials.com/windows-tutorials/remove-items-from-windows-xp-startup" title="Remove Items from Windows XP Startup">Remove Items from Windows XP Startup</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/hide-and-show-a-div-using-javascript" title="Hide and Show a Div Using Javascript">Hide and Show a Div Using Javascript</a></li><li><a href="http://teamtutorials.com/windows-tutorials/auto-defrag-with-3rd-party-software" title="Auto-Defrag with 3rd Party Software">Auto-Defrag with 3rd Party Software</a></li><li><a href="http://teamtutorials.com/site-news/upgraded-to-wordpress-222" title="Upgraded to Wordpress 2.2.2">Upgraded to Wordpress 2.2.2</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/programming-tutorials/installing-visual-basic-2005-express-edition/feed</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>

