<?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>KirkHings.com &#187; .Net</title>
	<atom:link href="http://kirkhings.com/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://kirkhings.com</link>
	<description>The '-berger' part trips up so many folks that I sometimes simplify my name for you. Yes, just for you.</description>
	<lastBuildDate>Sun, 27 Feb 2011 23:53:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Button-Driven Quotes</title>
		<link>http://kirkhings.com/code/visual-basic-code/button-driven-quotes/352/</link>
		<comments>http://kirkhings.com/code/visual-basic-code/button-driven-quotes/352/#comments</comments>
		<pubDate>Wed, 13 May 2009 03:12:21 +0000</pubDate>
		<dc:creator>Kirk</dc:creator>
				<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[academic challenge]]></category>
		<category><![CDATA[visual basic]]></category>

		<guid isPermaLink="false">http://kirkhings.com/?p=352</guid>
		<description><![CDATA[photo credit: bogenfreund This programming challenge is from a Visual Basic.Net programming course I took in Spring 2008. The Chapter (1) was titled &#8220;Introduction to Visual Basic .Net 2005&#8243;. I post these old academic challenges for a few reasons. One is to demonstrate my programming learning, experience, and progression. Another reason is to make sure [...]


Related posts:<ul><li><a href='http://kirkhings.com/code/visual-basic-code/diner-specials-display/375/' rel='bookmark' title='Diner Specials Display'>Diner Specials Display</a> <small>photo credit: wEnDaLicious This programming challenge is from a Visual...</small></li>
<li><a href='http://kirkhings.com/code/jquery/disable-submit-button-to-prevent-double-submit/170/' rel='bookmark' title='Disable Submit Button to Prevent Double-Submit'>Disable Submit Button to Prevent Double-Submit</a> <small>photo credit: kevindooley This programming snippet is from the book,...</small></li>
<li><a href='http://kirkhings.com/code/javascript/three-state-javascript-rollover/312/' rel='bookmark' title='Three-State JavaScript Rollover'>Three-State JavaScript Rollover</a> <small>photo credit: chimothy27 This programming challenge is from a Lynda.com...</small></li>
<li><a href='http://kirkhings.com/code/javascript/accessible-javascript-rollover-with-three-state-functionality/319/' rel='bookmark' title='Accessible JavaScript Rollover with Three-State Functionality'>Accessible JavaScript Rollover with Three-State Functionality</a> <small>photo credit: Rhian vK This programming challenge is from a...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="borrowedPic"><a href="http://www.flickr.com/photos/28548387@N00/486124675/" title="Descending Memories" target="_blank"><img src="http://farm1.static.flickr.com/187/486124675_f111c90f53.jpg" alt="Descending Memories" border="0" /></a><br /><small><a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Attribution-ShareAlike License" target="_blank"><img src="http://kirkhings.com/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/28548387@N00/486124675/" title="bogenfreund" target="_blank">bogenfreund</a></small></div>
<p>This programming challenge is from a Visual Basic.Net programming course I took in Spring 2008. The Chapter (1) was titled &#8220;Introduction to Visual Basic .Net 2005&#8243;.</p>
<p>I post these old academic challenges for a few reasons. One is to demonstrate my programming learning, experience, and progression. Another reason is to make sure my code and solutions are indexed by search engines, so that other beginning programmers may get help if they need it.</p>
<blockquote><p>1.3: Write a project that displays four short sayings. When the saying displays on your form, long lines will run off the form if the label&#8217;s AutoSize property is set to True. To wrap text within the label, change the AutoSize property to False and use the sizing handles to make the label large enough.<br />
Make a button for each saying with a descriptive Text property for each, as well as a button to exit the project.<br />
Include a label that holds your name at the bottom of the form. Also, make sure to change the form&#8217;s title bar to something meaningful.<br />
Change the Font properties of the large label to the font and size of your choice.<br />
Make sure the buttons are large enough to hold their entire Text properties.<br />
Follow good naming conventions for object names; include remarks at the top of every procedure and at the top of the file.
</p></blockquote>
<p>My solution code:</p>
<pre class="brush: vb; title: ; notranslate">
'Assignment 1
'Problem 1.3
'Kirk Hingsberger
'Display four sayings

Public Class quotesForm

    Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click
        ' Exits program

        Me.Close()
    End Sub

    Private Sub proofButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proofButton.Click
        ' Display Proof quote above

        Me.quotesLabel.Text = &quot;I remember the time I was kidnapped and they sent a piece of my finger to my father. He said he wanted more proof.&quot;
    End Sub

    Private Sub argueButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles argueButton.Click
        ' Display Argue quote above

        Me.quotesLabel.Text = &quot;Only a fool argues with a skunk, a mule or the cook.&quot;
    End Sub

    Private Sub upstreamButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles upstreamButton.Click
        ' Display Upstream quote above

        Me.quotesLabel.Text = &quot;Always drink upstream from the herd.&quot;
    End Sub

    Private Sub pmsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pmsButton.Click
        ' Display PMS quote above

        Me.quotesLabel.Text = &quot;Do you know why they call it 'PMS'? Because 'Mad Cow Disease' was already taken.&quot;
    End Sub
End Class
</pre>
<p>My solution&#8217;s build screenshot:</p>
<div id="attachment_371" class="wp-caption alignleft" style="width: 410px"><img src="http://kirkhings.com/wp-content/uploads/vb1-3.png" alt="Press a button to get a quote" title="vb1-3" width="400" height="242" class="size-full wp-image-371" /><p class="wp-caption-text">Press a button to get a quote</p></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fkirkhings.com%2Fcode%2Fvisual-basic-code%2Fbutton-driven-quotes%2F352%2F&amp;title=Button-Driven%20Quotes" id="wpa2a_2"><img src="http://kirkhings.com/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>

<p>Related posts:<ul><li><a href='http://kirkhings.com/code/visual-basic-code/diner-specials-display/375/' rel='bookmark' title='Diner Specials Display'>Diner Specials Display</a> <small>photo credit: wEnDaLicious This programming challenge is from a Visual...</small></li>
<li><a href='http://kirkhings.com/code/jquery/disable-submit-button-to-prevent-double-submit/170/' rel='bookmark' title='Disable Submit Button to Prevent Double-Submit'>Disable Submit Button to Prevent Double-Submit</a> <small>photo credit: kevindooley This programming snippet is from the book,...</small></li>
<li><a href='http://kirkhings.com/code/javascript/three-state-javascript-rollover/312/' rel='bookmark' title='Three-State JavaScript Rollover'>Three-State JavaScript Rollover</a> <small>photo credit: chimothy27 This programming challenge is from a Lynda.com...</small></li>
<li><a href='http://kirkhings.com/code/javascript/accessible-javascript-rollover-with-three-state-functionality/319/' rel='bookmark' title='Accessible JavaScript Rollover with Three-State Functionality'>Accessible JavaScript Rollover with Three-State Functionality</a> <small>photo credit: Rhian vK This programming challenge is from a...</small></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://kirkhings.com/code/visual-basic-code/button-driven-quotes/352/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

