<?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>Luigi Melisi &#187; VB.NET</title>
	<atom:link href="http://www.luigimelisi.com/tag/vb-net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.luigimelisi.com</link>
	<description>Development Blog : C# Code Samples,.NET Tips and Tricks</description>
	<lastBuildDate>Thu, 03 Mar 2011 09:01:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>[VB.NET] : Inviare una mail in formato HTML</title>
		<link>http://www.luigimelisi.com/tips-and-tricks/vb-net-inviare-una-mail-in-formato-html.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-inviare-una-mail-in-formato-html</link>
		<comments>http://www.luigimelisi.com/tips-and-tricks/vb-net-inviare-una-mail-in-formato-html.html#comments</comments>
		<pubDate>Sat, 20 Mar 2010 00:58:34 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[background color]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[body background]]></category>
		<category><![CDATA[ByVal]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[document write]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[host ip]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailmessage]]></category>
		<category><![CDATA[MessageBody]]></category>
		<category><![CDATA[MessageHead]]></category>
		<category><![CDATA[ReturnMessage]]></category>
		<category><![CDATA[sans serif font]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=713</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<pre class="brush: vb; title: ; notranslate">
Function SendEmail(ByVal ToAddress As String, ByVal FromAddress As String, ByVal MessageSubject As String, ByVal MessageBody As String)
Dim MessageHead As String = &quot;&lt;html&gt;&lt;head&gt;&quot;
MessageHead = MessageHead &amp; &quot;&lt;style &quot;
MessageHead = MessageHead &amp; &quot;body {background-color:#F7F7F7; color:#000; font-family:arial,verdana,sans-serif; font-size:12px;}&quot;
MessageHead = MessageHead &amp; &quot;&lt;/style&gt;&lt;/head&gt;&lt;/body&gt;&quot;
Dim MessageFoot As String = &quot;&lt;/body&gt;&lt;/html&gt;&quot;
MessageBody = MessageHead &amp; MessageBody &amp; MessageFoot
Dim ReturnMessage As String = &quot;&quot;
Dim mm As New MailMessage(FromAddress, ToAddress)
Dim smtp As New SmtpClient
mm.Subject = MessageSubject
mm.Body = MessageBody
mm.IsBodyHtml = True
Try
smtp.Host = &quot;0.0.0.0&quot; 'ADD HOST IP
smtp.Send(mm)
ReturnMessage = &quot;La mail è stata inviata&quot;
Catch ex As Exception
ReturnMessage = &quot;Spiacente, c’è stato un problema! &quot; &amp;amp; ex.Message
End Try
SendEmail = ReturnMessage
End Function
</pre>
<p><a rel="nofollow" href="http://www.youbuy.it/lastminute.aspx" target="_blank"><img class="aligncenter" title="YouBuy.it - Last Minute - Offerte Sottocosto" src="http://images.youbuy.it/adv/last.jpg" alt="last [VB.NET] : Inviare una mail in formato HTML" width="450" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/tips-and-tricks/vb-net-inviare-una-mail-in-formato-html.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[VB.NET] : Popolare una DataTable con un file CVS</title>
		<link>http://www.luigimelisi.com/tips-and-tricks/vb-net-popolare-una-datatable-con-un-file-cvs.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-popolare-una-datatable-con-un-file-cvs</link>
		<comments>http://www.luigimelisi.com/tips-and-tricks/vb-net-popolare-una-datatable-con-un-file-cvs.html#comments</comments>
		<pubDate>Sat, 20 Mar 2010 00:54:39 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[ControlChars]]></category>
		<category><![CDATA[DataTable]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[finalLine]]></category>
		<category><![CDATA[fullFileStr]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[New]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[row]]></category>
		<category><![CDATA[Split]]></category>
		<category><![CDATA[streamreader]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=711</guid>
		<description><![CDATA[Di seguito un semplice esempio che mostra come popolare un DataTable utilizzando Vb.Net.]]></description>
			<content:encoded><![CDATA[<p>Di seguito un semplice esempio che mostra come popolare un <strong>DataTable</strong> utilizzando Vb.Net :
<pre class="brush: vb; title: ; notranslate">
Function ReadCSV(ByVal path As String) As System.Data.DataTable
Dim sr As New StreamReader(path)
Dim fullFileStr As String = sr.ReadToEnd()
sr.Close()
sr.Dispose()
Dim lines As String() = fullFileStr.Split(ControlChars.Lf)
Dim recs As New DataTable()
Dim sArr As String() = lines(0).Split(&quot;,&quot;c)
For Each s As String In sArr
recs.Columns.Add(New DataColumn())
Next
Dim row As DataRow
Dim finalLine As String = &quot;&quot;
For Each line As String In lines
row = recs.NewRow()
finalLine = line.Replace(Convert.ToString(ControlChars.Cr), &quot;&quot;)
row.ItemArray = finalLine.Split(&quot;,&quot;c)
recs.Rows.Add(row)
Next
Return recs
End Function&lt;/pre&gt;
</pre>
<p><a href="http://www.youbuy.it/lastminute.aspx" rel="nofollow" target="_blank"><img class="aligncenter" title="YouBuy.it - Last Minute - Offerte Sottocosto" src="http://images.youbuy.it/adv/last.jpg" alt="last [VB.NET] : Popolare una DataTable con un file CVS" width="450" height="600" /></a><br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/tips-and-tricks/vb-net-popolare-una-datatable-con-un-file-cvs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[VB.NET] : Accesso in lettura ad una DataTable</title>
		<link>http://www.luigimelisi.com/tips-and-tricks/vb-net-accesso-in-lettura-ad-una-datatable.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-accesso-in-lettura-ad-una-datatable</link>
		<comments>http://www.luigimelisi.com/tips-and-tricks/vb-net-accesso-in-lettura-ad-una-datatable.html#comments</comments>
		<pubDate>Sat, 20 Mar 2010 00:50:35 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[ByVal]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[data source]]></category>
		<category><![CDATA[DataTable]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[document write]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[jet oledb]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[microsoft jet]]></category>
		<category><![CDATA[New]]></category>
		<category><![CDATA[oledbdataadapter]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[strConn]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[uri]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=709</guid>
		<description><![CDATA[
1
2
3
4
5
6
7
Function ReadAccess(ByVal sqlString As String, ByVal path As String) As System.Data.DataTable
Dim strConn As String = _&#34;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#34; &#38;amp; path &#38;amp; &#34;;&#34;
Dim recs As New Data.DataTable()
DIm sql As New OleDbDataAdapter(sqlString,  [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Function</span> ReadAccess(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sqlString <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> path <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>) <span style="color: #151B8D; font-weight: bold;">As</span> System.Data.DataTable
<span style="color: #151B8D; font-weight: bold;">Dim</span> strConn <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = _<span style="color: #800000;">&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;</span> &amp;amp; path &amp;amp; <span style="color: #800000;">&quot;;&quot;</span>
<span style="color: #151B8D; font-weight: bold;">Dim</span> recs <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> Data.DataTable()
<span style="color: #151B8D; font-weight: bold;">DIm</span> sql <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> OleDbDataAdapter(sqlString, strConn)
sql.Fill(recs)
Return recs
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Function</span></pre></td></tr></table></div>

<p><script type="text/javascript">// <![CDATA[
var uri = 'http://impit.tradedoubler.com/imp?type(js)g(16492944)a(1765811)' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript type="text/javascript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
// ]]&gt;</script><br />
<a href="http://www.youbuy.it/lastminute.aspx"><img class="aligncenter" title="Offerte Last Minute YouBuy.it" src="http://images.youbuy.it/adv/last.jpg" alt="last [VB.NET] : Accesso in lettura ad una DataTable" width="450" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/tips-and-tricks/vb-net-accesso-in-lettura-ad-una-datatable.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[VB.NET] : Individuare tutte le stampanti installate</title>
		<link>http://www.luigimelisi.com/tips-and-tricks/individuare-tutte-le-stampanti-installate.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=individuare-tutte-le-stampanti-installate</link>
		<comments>http://www.luigimelisi.com/tips-and-tricks/individuare-tutte-le-stampanti-installate.html#comments</comments>
		<pubDate>Sat, 20 Mar 2010 00:45:01 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[ChargeImpresoras]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[document write]]></category>
		<category><![CDATA[lPrintDoc]]></category>
		<category><![CDATA[lPrinter]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[New]]></category>
		<category><![CDATA[new printing]]></category>
		<category><![CDATA[Overrides]]></category>
		<category><![CDATA[PrintDocument]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Protected]]></category>
		<category><![CDATA[sub]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=706</guid>
		<description><![CDATA[
1
2
3
4
5
6
7
Protected Overrides Sub ChargeImpresoras()
Dim lPrintDoc As New Printing.PrintDocument
Dim lPrinter As Object
For Each lPrinter In PrinterSettings.InstalledPrinters
cboPrinters.Items.Add(lPrinter)
Next
End Sub


var uri =  [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">Protected Overrides <span style="color: #E56717; font-weight: bold;">Sub</span> ChargeImpresoras()
<span style="color: #151B8D; font-weight: bold;">Dim</span> lPrintDoc <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> Printing.PrintDocument
<span style="color: #151B8D; font-weight: bold;">Dim</span> lPrinter <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>
<span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> lPrinter <span style="color: #8D38C9; font-weight: bold;">In</span> PrinterSettings.InstalledPrinters
cboPrinters.Items.Add(lPrinter)
<span style="color: #8D38C9; font-weight: bold;">Next</span>
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></td></tr></table></div>

<p><script type="text/javascript">
var uri = 'http://impit.tradedoubler.com/imp?type(js)g(16492944)a(1765811)' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript type="text/javascript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/tips-and-tricks/individuare-tutte-le-stampanti-installate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB.NET : Come Invertire una stringa</title>
		<link>http://www.luigimelisi.com/programmazione/net_framework/vb-net-come-invertire-una-stringa.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-come-invertire-una-stringa</link>
		<comments>http://www.luigimelisi.com/programmazione/net_framework/vb-net-come-invertire-una-stringa.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:37:10 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[.Net FrameWork]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[charArray]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[ReverseOrder]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[sub]]></category>
		<category><![CDATA[textInput]]></category>
		<category><![CDATA[WriteLine]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=619</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<pre class="brush: vb; title: ; notranslate">
Module RevString
Sub Main()
Dim inputString As String = Console.ReadLine()
ReverseOrder(inputString)
End Sub
Private Sub ReverseOrder(ByVal textInput As String)
Dim text2Rev As String = textInput
Dim reversed As String
Dim charArray() As Char = textInput.ToCharArray()
Array.Reverse(charArray)
reversed = charArray
Console.WriteLine(&quot;&quot;)
Console.WriteLine(&quot;Testo originale: &quot; + text2Rev)
Console.WriteLine(&quot;Testo invertito: &quot; + reversed)
End Sub
End Module
</pre>
<p><a href="http://www.youbuy.it/lastminute.aspx" rel="nofollow" target="_blank"><img class="aligncenter" title="YouBuy.it - Last Minute - Offerte Sottocosto" src="http://images.youbuy.it/adv/last.jpg" alt="last VB.NET : Come Invertire una stringa" width="450" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/programmazione/net_framework/vb-net-come-invertire-una-stringa.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB.NET : Una comoda barra di avanzamento</title>
		<link>http://www.luigimelisi.com/programmazione/net_framework/vb-net-una-comoda-barra-di-avanzamento.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-una-comoda-barra-di-avanzamento</link>
		<comments>http://www.luigimelisi.com/programmazione/net_framework/vb-net-una-comoda-barra-di-avanzamento.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:34:43 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[.Net FrameWork]]></category>
		<category><![CDATA[frmMDIParent]]></category>
		<category><![CDATA[Integer]]></category>
		<category><![CDATA[ToolStripProgressBar]]></category>
		<category><![CDATA[value]]></category>
		<category><![CDATA[Visible]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=617</guid>
		<description><![CDATA[frmMDIParent.ToolStripProgressBar1.Value = 0
frmMDIParent.ToolStripProgressBar1.Visible = True
For i As Integer = 0 To frmMDIParent.ToolStripProgressBar1.Maximum ‐ 1
frmMDIParent.ToolStripProgressBar1.Value = frmMDIParent.ToolStripProgressBar1.Value + 1
Next
]]></description>
			<content:encoded><![CDATA[<blockquote><p><em><strong>frmMDIParent.ToolStripProgressBar1.Value = 0<br />
frmMDIParent.ToolStripProgressBar1.Visible = True<br />
For i As Integer = 0 To frmMDIParent.ToolStripProgressBar1.Maximum ‐ 1<br />
frmMDIParent.ToolStripProgressBar1.Value = frmMDIParent.ToolStripProgressBar1.Value + 1<br />
Next</strong></em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/programmazione/net_framework/vb-net-una-comoda-barra-di-avanzamento.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB.NET : Come contare le linee di un richtextbox</title>
		<link>http://www.luigimelisi.com/programmazione/net_framework/vb-net-contare-le-linee-di-un-richtextbox.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vb-net-contare-le-linee-di-un-richtextbox</link>
		<comments>http://www.luigimelisi.com/programmazione/net_framework/vb-net-contare-le-linee-di-un-richtextbox.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:28:39 +0000</pubDate>
		<dc:creator>Luigi Melisi</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[.Net FrameWork]]></category>
		<category><![CDATA[ByVal]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[dim]]></category>
		<category><![CDATA[msgbox]]></category>
		<category><![CDATA[richtextbox]]></category>
		<category><![CDATA[rtb]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[sub]]></category>

		<guid isPermaLink="false">http://www.luigimelisi.com/?p=614</guid>
		<description><![CDATA[L'esempio riportato di seguito mostra come contare le linee di un RichTextbox utilizzando Vb.Net :
]]></description>
			<content:encoded><![CDATA[<p>L&#8217;esempio riportato di seguito mostra come contare le linee di un RichTextbox utilizzando Vb.Net :</p>
<pre class="brush: csharp; title: ; notranslate">
private sub countlines(byval rtb as richtextbox)
          dim count as string
          count = rtb.lines.count
          msgbox(count)
end sub
</pre>
<p><a href="http://www.youbuy.it/lastminute.aspx" rel="nofollow" target="_blank"><img class="aligncenter" title="YouBuy.it - Last Minute - Offerte Sottocosto" src="http://images.youbuy.it/adv/last.jpg" alt="last VB.NET : Come contare le linee di un richtextbox" width="450" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luigimelisi.com/programmazione/net_framework/vb-net-contare-le-linee-di-un-richtextbox.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

