<?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>Solomon &#187; VB.NET</title>
	<atom:link href="http://www.ms.oyangudi.com/blog/category/vbnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ms.oyangudi.com/blog</link>
	<description>from Oyangudi...</description>
	<lastBuildDate>Tue, 18 Oct 2011 02:38:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>DateTimePicker &#8211; reset focus</title>
		<link>http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/</link>
		<comments>http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 03:54:18 +0000</pubDate>
		<dc:creator>Solomon</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[DatTimePicker reset focus]]></category>

		<guid isPermaLink="false">http://www.ms.oyangudi.com/blog/vbnet/datetimepicker-reset-focus/</guid>
		<description><![CDATA[Code Snippet &#8211; C# Code Snippet - VB.NET]]></description>
			<content:encoded><![CDATA[<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="DateTimePicker &ndash; reset focus" data-url="http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
<p><strong>Code Snippet &#8211; C#</strong></p>
<pre class="brush: csharp; title: ; notranslate">
        private void dateTimePicker1_Enter(object sender, EventArgs e)
        {
            DateTimePickerFormat fmt = dateTimePicker1.Format;

            dateTimePicker1.Format = DateTimePickerFormat.Long;
            dateTimePicker1.Format = DateTimePickerFormat.Custom;
            dateTimePicker1.Format = fmt;
        }
</pre>
</pre>
<p><strong>Code Snippet - VB.NET</strong></p>
<pre class="brush: vb; title: ; notranslate">

    Private Sub DateTimePicker1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.Enter
        Dim fmt As DateTimePickerFormat = DateTimePicker1.Format

        DateTimePicker1.Format = DateTimePickerFormat.Long
        DateTimePicker1.Format = DateTimePickerFormat.Custom
        DateTimePicker1.Format = fmt
    End Sub
</pre>
<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="DateTimePicker &ndash; reset focus" data-url="http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ms.oyangudi.com/blog/csharp/datetimepicker-reset-focus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Auto Complete ComboBox &#8211; VB.NET Windows Forms</title>
		<link>http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/</link>
		<comments>http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 04:40:15 +0000</pubDate>
		<dc:creator>Solomon</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Auto Complete ComboBox]]></category>

		<guid isPermaLink="false">http://www.ms.oyangudi.com/blog/?p=27</guid>
		<description><![CDATA[Download source files &#8211; 17.6 Kb Download demo project &#8211; 9.08 Kb Introduction This is a simple code snippet which is used to make an Auto Complete ComboBox. Using the code Usage: Call the subroutine from within the ComboBox&#8217;s KeyPress event handler. cb &#8211; ComboBox used to make the Auto Complete ComboBox. e &#8211; System.Windows.Forms.KeyPressEventArgs [...]]]></description>
			<content:encoded><![CDATA[<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="Auto Complete ComboBox &ndash; VB.NET Windows Forms" data-url="http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
<ul>
<li><a href="http://www.ms.oyangudi.com/blog/wp-content/uploads/AutoCompleteComboBoxVB.NETWindowsForms_1485F/Auto_Complele_ComboBox_src_vb.zip">Download source files &#8211; 17.6 Kb</a> </li>
<li><a href="http://www.ms.oyangudi.com/blog/wp-content/uploads/AutoCompleteComboBoxVB.NETWindowsForms_1485F/Auto_Complele_ComboBox_demo_vb.zip">Download demo project &#8211; 9.08 Kb</a> </li>
</ul>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="AutoComplete" border="0" alt="AutoComplete" src="http://www.ms.oyangudi.com/blog/wp-content/uploads/AutoCompleteComboBoxVB.NETWindowsForms_1485F/AutoComplete.gif" width="320" height="288" /> </p>
</p>
<h4>Introduction</h4>
<p>This is a simple code snippet which is used to make an <b>Auto Complete ComboBox.</b> </p>
<h4>Using the code</h4>
<p><b>Usage:</b> Call the subroutine from within the ComboBox&#8217;s <code>KeyPress</code> event handler. </p>
<div>
<pre class="brush: vb; title: ; notranslate">

AutoComplete(ByRef cb As ComboBox, ByVal e As System.Windows.Forms.KeyPressEventArgs, Optional ByVal blnLimitToList As Boolean = False)
</pre>
</div>
<ul>
<li><code>cb</code> &#8211; ComboBox used to make the Auto Complete ComboBox. </li>
<li><code>e</code> &#8211; <code>System.Windows.Forms.KeyPressEventArgs</code> used to handle the keyboard inputs. </li>
<li><code>blnLimitToList</code> &#8211; Optional Boolean value indicating whether the user input is limited to the list values or not. </li>
</ul>
<h4>Code</h4>
<div>
<pre class="brush: vb; title: ; notranslate">

    ' AutoComplete
    Public Sub AutoComplete(ByRef cb As ComboBox, ByVal e As System.Windows.Forms.KeyPressEventArgs, Optional ByVal blnLimitToList As Boolean = False)
        Dim strFindStr As String

        If e.KeyChar = Chr(8) Then  'Backspace
            If cb.SelectionStart &lt;= 1 Then
                cb.Text = &quot;&quot;
                Exit Sub
            End If
            If cb.SelectionLength = 0 Then
                strFindStr = cb.Text.Substring(0, cb.Text.Length - 1)
            Else
                strFindStr = cb.Text.Substring(0, cb.SelectionStart - 1)
            End If
        Else
            If cb.SelectionLength = 0 Then
                strFindStr = cb.Text &amp; e.KeyChar
            Else
                strFindStr = cb.Text.Substring(0, cb.SelectionStart) &amp; e.KeyChar
            End If
        End If

        Dim intIdx As Integer = -1

        ' Search the string in the Combo Box List.
        intIdx = cb.FindString(strFindStr)

        If intIdx &lt;&gt; -1 Then ' String found in the List.
            cb.SelectedText = &quot;&quot;
            cb.SelectedIndex = intIdx
            cb.SelectionStart = strFindStr.Length
            cb.SelectionLength = cb.Text.Length
            e.Handled = True
        Else
            If blnLimitToList = True Then
                e.Handled = True
            Else
                e.Handled = False
            End If
        End If
    End Sub
</pre>
</div>
<pre>&#160;</pre>
<h4>History</h4>
<ul>
<li>Released on July 30<sup>th</sup>, 2005. </li>
</ul>
<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="Auto Complete ComboBox &ndash; VB.NET Windows Forms" data-url="http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ms.oyangudi.com/blog/vbnet/auto-complete-combobox-vb-net-windows-forms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Storing and retrieving Images from Access database using VB.Net</title>
		<link>http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/</link>
		<comments>http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 04:12:05 +0000</pubDate>
		<dc:creator>Solomon</dc:creator>
				<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.ms.oyangudi.com/blog/?p=23</guid>
		<description><![CDATA[Download source files (38.52 kb) Download demo project (52.11 Kb) &#160; Introduction This is a simple code snippet which is used to store and retrieve images from Access database using VB.net. Code]]></description>
			<content:encoded><![CDATA[<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="Storing and retrieving Images from Access database using VB.Net" data-url="http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
<ul>
<li><a href="http://www.ms.oyangudi.com/blog/wp-content/uploads/StoringandretrievingImagesfromAccess.Net_101F3/ImageDb_src_vb.zip" target="_blank">Download source files (38.52 kb)</a> </li>
<li><a href="http://www.ms.oyangudi.com/blog/wp-content/uploads/StoringandretrievingImagesfromAccess.Net_101F3/ImageDb_demo_vb.zip" target="_blank">Download demo project (52.11 Kb)</a> </li>
</ul>
<p>&#160;<img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ImageDb" border="0" alt="ImageDb" src="http://www.ms.oyangudi.com/blog/wp-content/uploads/StoringandretrievingImagesfromAccess.Net_101F3/ImageDb.jpg" width="300" height="264" /> </p>
<h5>Introduction</h5>
<p>This is a simple code snippet which is used to store and retrieve images from Access database using VB.net. </p>
<p><b>Code</b>     </p>
<div>
<pre class="brush: vb; title: ; notranslate">

    Private Sub ShowDetails()
        Try
            Dim cn As New OleDb.OleDbConnection
            Dim cmd As OleDb.OleDbCommand
            Dim dr As OleDb.OleDbDataReader

            cn.ConnectionString = mstrConnection
            cn.Open()

            cmd = cn.CreateCommand()
            cmd.CommandText = &quot;SELECT I_Image FROM tblImage WHERE I_Name = '&quot; &amp; cbI_Name.Text &amp; &quot;'&quot;

            dr = cmd.ExecuteReader

            If dr.Read Then
                Dim bytImage() As Byte

                Try
                    bytImage = CType(dr(0), Byte())
                    Dim ms As New System.IO.MemoryStream(bytImage)
                    Dim bmImage As New Bitmap(ms)
                    ms.Close()

                    pbI_Image.Image = bmImage
                    pbI_Image.Refresh()
                Catch ex As Exception
                    MsgBox(ex.ToString)
                End Try
            End If

            dr.Close()
            cn.Close()

            cmd.Dispose()
            cn.Dispose()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub SaveData()
        Try
            Dim cn As New OleDb.OleDbConnection
            Dim cmd As OleDb.OleDbCommand

            cn.ConnectionString = mstrConnection
            cn.Open()

            cmd = cn.CreateCommand()

            If mstrFlag = &quot;N&quot; Then
                cmd.CommandText = &quot;INSERT INTO tblImage VALUES (@I_Name, @I_Image)&quot;
            ElseIf mstrFlag = &quot;M&quot; Then
                cmd.CommandText = &quot;UPDATE tblImage SET I_Name = @I_Name, I_Image = @I_Image WHERE I_Name = '&quot; &amp; cbI_Name.Tag.ToString &amp; &quot;'&quot;
            End If

            Dim bytImage() As Byte

            Try
                Dim ms As New System.IO.MemoryStream
                Dim bmpImage As New Bitmap(pbI_Image.Image)

                bmpImage.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
                bytImage = ms.ToArray()
                ms.Close()
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try

            cmd.Parameters.Add(New OleDb.OleDbParameter(&quot;@I_Name&quot;, OleDb.OleDbType.VarChar, 120))
            cmd.Parameters.Add(New OleDb.OleDbParameter(&quot;@I_Image&quot;, OleDb.OleDbType.Binary))
            cmd.Parameters(&quot;@I_Name&quot;).Value = cbI_Name.Text
            cmd.Parameters(&quot;@I_Image&quot;).Value = bytImage

            If cmd.ExecuteNonQuery() &gt; 0 Then
                MsgBox(&quot;Record has been &quot; &amp; IIf(mstrFlag = &quot;N&quot;, &quot;added&quot;, &quot;modified&quot;).ToString &amp; &quot; successfully.&quot;, MsgBoxStyle.Information)
            End If

            cmd.Dispose()
            cn.Dispose()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

        FillData()
    End Sub
</pre>
</div>
<div class="simplesocialbuttons">
<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium" count="true" href="http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/"></g:plusone></div>
<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>
<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="Storing and retrieving Images from Access database using VB.Net" data-url="http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/" class="twitter-share-button" rel="nofollow"></a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ms.oyangudi.com/blog/vbnet/storing-and-retrieving-images-from-access-database-using-vb-net/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

