<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://vbcity.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>vbCity - The .NET Developer Community: Active Threads</title><link>http://vbcity.com/forums/TopicsActive.aspx</link><description>Posts with recent activity</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>What's everyone up to nowadays?</title><link>http://vbcity.com/forums/thread/723701.aspx</link><pubDate>Fri, 11 Apr 2025 13:25:42 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723701</guid><dc:creator>wonkotsane</dc:creator><slash:comments>6</slash:comments><comments>http://vbcity.com/forums/thread/723701.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=37&amp;PostID=723701</wfw:commentRss><description>&lt;p&gt;The glory days of vbCity are behind us which is a real shame but life goes on.&lt;/p&gt;
&lt;p&gt;What is everyone doing now? Especially those of us who go back to the early days.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m currently a ServiceNow Architect for NTT DATA Business Solutions. Widowed, remarried and two grandsons.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Where did everyone go?</title><link>http://vbcity.com/forums/thread/696910.aspx</link><pubDate>Wed, 15 Sep 2010 19:11:35 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:696910</guid><dc:creator>rjhare</dc:creator><slash:comments>84</slash:comments><comments>http://vbcity.com/forums/thread/696910.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=37&amp;PostID=696910</wfw:commentRss><description>&lt;p&gt;Chaps...&lt;/p&gt;
&lt;p&gt;Where&amp;#39;s everyone gone?&amp;nbsp; Hmm?&amp;nbsp; Like&lt;/p&gt;
&lt;p&gt;Lazyjay, Wonko, Drydo, Shandy, Mike Hilden....to name but one or two&lt;/p&gt;
&lt;p&gt;I know its been a while myself, but these guys lived here once like me - where&amp;#39;s the neighbourhood gone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>20 Years already?</title><link>http://vbcity.com/forums/thread/723661.aspx</link><pubDate>Thu, 23 Dec 2021 13:39:29 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723661</guid><dc:creator>rjhare</dc:creator><slash:comments>7</slash:comments><comments>http://vbcity.com/forums/thread/723661.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=37&amp;PostID=723661</wfw:commentRss><description>&lt;p&gt;How do!&lt;br /&gt;I thought I&amp;#39;d be the first to say, Happy 20th birthday VBCity. I am the vMan I am today because of you, and Serge obviously.&lt;br /&gt;&lt;br /&gt;Happy Christmas to you all - and a very happy New Year!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>status of queue printer job vb 6.0</title><link>http://vbcity.com/forums/thread/723695.aspx</link><pubDate>Wed, 05 Feb 2025 11:46:30 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723695</guid><dc:creator>sal21 sal21</dc:creator><slash:comments>1</slash:comments><comments>http://vbcity.com/forums/thread/723695.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=723695</wfw:commentRss><description>&lt;p&gt;How to check the&amp;nbsp;status of queue printer job vb 6.0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Does VB6 still have a place in 2025?</title><link>http://vbcity.com/forums/thread/723692.aspx</link><pubDate>Tue, 14 Jan 2025 15:38:59 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723692</guid><dc:creator>wonkotsane</dc:creator><slash:comments>2</slash:comments><comments>http://vbcity.com/forums/thread/723692.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=723692</wfw:commentRss><description>&lt;p&gt;Many, many ... many years ago I spent hours a day here on these forums and made friends that I still keep in touch with (albeit infrequently) to this day.&lt;/p&gt;
&lt;p&gt;Over the Christmas period I decided to fire up an XP VM with VB6 and take a trip down memory lane and I surprised myself not only by how much I remembered but how much better my code is despite not being hands-on for a very long time.&lt;/p&gt;
&lt;p&gt;VB6 was deprecated a long time ago but it&amp;#39;s still a perfectly serviceable development environment. But just because you can doesn&amp;#39;t mean you should. Does VB6 still have a place in 2025 or is it time to finally let it go?&lt;/p&gt;&lt;p align="center"&gt;[Please visit the site to access the poll]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Happy new year and where is everybody?</title><link>http://vbcity.com/forums/thread/723679.aspx</link><pubDate>Thu, 04 Jan 2024 11:50:57 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723679</guid><dc:creator>Michael Newman</dc:creator><slash:comments>3</slash:comments><comments>http://vbcity.com/forums/thread/723679.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=37&amp;PostID=723679</wfw:commentRss><description>&lt;p&gt;A happy 2024 to all of those who still visit VBCity.&lt;/p&gt;
&lt;p&gt;It is so sad to see that the site has all but been abandoned.&amp;nbsp; I learned an enormous amount by asking questions and having them answered in a civil way.&amp;nbsp; Why did it fade away so quickly a few years ago?&amp;nbsp; I hope it does not get shut down as there is still a wealth of information in the various forums.&lt;/p&gt;
&lt;p&gt;I am looking for help with an ADO.Net problem and have not managed to get any help by using Google.&lt;/p&gt;
&lt;p&gt;How to we get this site working again in way that it did about 10 years ago?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Global 2D string array not visible throughout program</title><link>http://vbcity.com/forums/thread/723688.aspx</link><pubDate>Sat, 07 Sep 2024 17:41:51 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723688</guid><dc:creator>vbFossil</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723688.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=41&amp;PostID=723688</wfw:commentRss><description>&lt;p&gt;Hello!&amp;nbsp; I am converting an old VB6 program to VB.Net and there are subtle differences that I am not aware of.&amp;nbsp; In VB6, I could define 2D string arrays at the program header (before procedural coding began) and those variables were visible from everywhere.&amp;nbsp; That does not work in VB.Net.&lt;/p&gt;
&lt;p&gt;When I run the program I get this error &amp;quot;Object reference not set to an instance of an object.&amp;quot;.&amp;nbsp; The program is aware that the variables exist, but it seems as if they are not initialized.&lt;/p&gt;
&lt;p&gt;Here is a snippet of the code.&amp;nbsp; It is not functional but merely displayed to show the location of the variables and where they are called from.&lt;/p&gt;
&lt;p&gt;Public Class Form1&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Public strNewTools(200, 3) As String&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Public strOldTools(200, 3) As String&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Public strOldTools(200, 3) As String&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Public strOldSort(200, 3) As String&lt;/p&gt;
&lt;p&gt;Public Sub cmdCompare_MouseDown(sender As Object, e As MouseEventArgs) Handles cmdCompare.MouseDown&lt;/p&gt;
&lt;p&gt;intInner = intInner + 1&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If strNewTools(intOuter, 3) = strOldTools(intInner, 3) Then&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strToolTmp = strToolTmp &amp;amp; strNewTools(intOuter, 1) &amp;amp; strOldTools(intInner, 1) &amp;amp; vbCrLf&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strNewSort(intOuter, 1) = strNewTools(intOuter, 1)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strNewSort(intOuter, 2) = strNewTools(intOuter, 2)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strNewSort(intOuter, 3) = strNewTools(intOuter, 3)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strOldSort(intOuter, 1) = strOldTools(intInner, 1)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strOldSort(intOuter, 2) = strOldTools(intInner, 2)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strOldSort(intOuter, 3) = strOldTools(intInner, 3)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;End Class&lt;/p&gt;
&lt;p&gt;I even tried to make the definition &amp;quot;Public&amp;quot; as well as the referenced subroutine.&amp;nbsp; No luck.&lt;/p&gt;
&lt;p&gt;What is the right way to do this?&lt;/p&gt;
&lt;p&gt;Thank you, Steveb&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Upgrade, but will it work?</title><link>http://vbcity.com/forums/thread/723093.aspx</link><pubDate>Mon, 05 Jun 2017 11:50:45 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723093</guid><dc:creator>davek0974</dc:creator><slash:comments>8</slash:comments><comments>http://vbcity.com/forums/thread/723093.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=723093</wfw:commentRss><description>&lt;p&gt;Looking to upgrade our system but have a couple of questions...&lt;/p&gt;
&lt;p&gt;Currently our SQL database is SQL7(2003 vintage) and the new one will be SQL 2016, does anyone know if you can still talk to SQL 2016 using OLEDB/ADO connections as my app uses that method??&lt;/p&gt;
&lt;p&gt;Next, we all know VB was killed off some time ago, its the only language i know, what would be the replacement for it for modern-day programming of office/accounts/database programming of front-end apps? I dont think i will have the courage to start re-writing this massive app but I woul dbe interested to see what visual programming stuff is out there.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>VB6 AFTER MS WINDOWS 10 </title><link>http://vbcity.com/forums/thread/720852.aspx</link><pubDate>Sun, 01 Nov 2015 11:24:18 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:720852</guid><dc:creator>elico</dc:creator><slash:comments>19</slash:comments><comments>http://vbcity.com/forums/thread/720852.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=720852</wfw:commentRss><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is it ttrue that VB6 will not be suppotred in the OS that will come after AINDOWS 10 ?&lt;/p&gt;
&lt;p&gt;Elico&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>how to detect printer status using VB6</title><link>http://vbcity.com/forums/thread/377445.aspx</link><pubDate>Wed, 16 Feb 2005 05:32:18 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:377445</guid><dc:creator>mamta chander</dc:creator><slash:comments>2</slash:comments><comments>http://vbcity.com/forums/thread/377445.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=377445</wfw:commentRss><description> I am using data reports in VB6. I want to print a report using &lt;br&gt;Report1.PrintReport False, rptRangeAllPages &lt;br&gt;&lt;br&gt;printer is available on network.but I don't get any error message that printer is not available.plz help me to find the solution to show user, the unavailability of printer.&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Delete Account</title><link>http://vbcity.com/forums/thread/708476.aspx</link><pubDate>Sun, 11 Mar 2012 09:10:59 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:708476</guid><dc:creator>Anonymous</dc:creator><slash:comments>5</slash:comments><comments>http://vbcity.com/forums/thread/708476.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=61&amp;PostID=708476</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I wish to delete my account but when I search through forum, each account is permanent. It is possible to delete this accoount from the administration?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;roonmar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>real time counter of popolation in Italy</title><link>http://vbcity.com/forums/thread/723681.aspx</link><pubDate>Sat, 25 May 2024 17:07:58 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723681</guid><dc:creator>sal21 sal21</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723681.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=723681</wfw:commentRss><description>&lt;p&gt;How to insert a real time counter of population of Italy, in a label or text box?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Read PDF File using VB.NET</title><link>http://vbcity.com/forums/thread/723680.aspx</link><pubDate>Sun, 24 Mar 2024 03:18:34 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723680</guid><dc:creator>Lalit Acharekar</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723680.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=33&amp;PostID=723680</wfw:commentRss><description>&lt;link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"&gt;&lt;/link&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushVb.js"&gt;&lt;/script&gt;
&lt;pre class="line-numbers  language-vbnet"&gt;&lt;code&gt;I am having Scanned PDF File /having headers like Date,PO. No, Item Description, etc I want to read the Values written In front of/below these&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="line-numbers  language-vbnet"&gt;&lt;code&gt;Titles.I used the below code but it isnt working and giving me the desired result &lt;/code&gt;&lt;/pre&gt;
&lt;pre class="line-numbers  language-vbnet"&gt;&lt;code&gt;Please assist &lt;/code&gt;&lt;/pre&gt;
&lt;pre class="line-numbers  language-vbnet"&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="line-numbers  language-vbnet"&gt;&lt;span style="font-family:monospace;"&gt;&lt;pre name="fae81f99814d4d4480c09d44199a4ff4" class="VB.NET"&gt;
Imports Emgu.CV
Imports Emgu.Util
Imports Emgu.CV.OCR
Imports Emgu.CV.Structure
	Dim OCRz As Tesseract = New Tesseract(&amp;quot;tessdata&amp;quot;, &amp;quot;eng&amp;quot;, Tesseract.OcrEngineMode.OEM_DEFAULT)
    Dim pic As Bitmap = New Bitmap(270, 100)
    Dim gfx As Graphics = Graphics.FromImage(pic)

gfx.CopyFromScreen(New Point(Me.Location.X + PictureBox1.Location.X + 4, Me.Location.Y + PictureBox1.Location.Y + 30), New Point(0, 0), pic.Size)
        PictureBox1.Image = pic
        PictureBox1.Image = Nothing

 OCRz.Recognize(New Image(Of Bgr, Byte)(pic))
        RichTextBox1.Text = OCRz.GetText
&lt;/pre&gt; &lt;/span&gt;&lt;/pre&gt;&lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('fae81f99814d4d4480c09d44199a4ff4')
&lt;/script&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Saving a Textbox List to a Database table</title><link>http://vbcity.com/forums/thread/723676.aspx</link><pubDate>Sat, 18 Mar 2023 23:11:27 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723676</guid><dc:creator>Stephen Mills</dc:creator><slash:comments>1</slash:comments><comments>http://vbcity.com/forums/thread/723676.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=723676</wfw:commentRss><description>&lt;link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"&gt;&lt;/link&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushVb.js"&gt;&lt;/script&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The code below is used to save a list thats in a textbox to an Access database table.&lt;/p&gt;
&lt;p&gt;The code sort of works, it saves the data but after its saved about 80 ish lines, it then muddles up the order of the list.&lt;/p&gt;
&lt;p&gt;So once saved, all the items in the list are saved to the database but it is not in the correct order.&lt;/p&gt;
&lt;p&gt;&lt;pre name="4a514ed35aa043d59b754f0e4b814ec6" class="VB"&gt;
&amp;#39;Open connection to database tbl_PartsList
    Dim cnnSave As ADODB.Connection
    Set cnnSave = New ADODB.Connection
    cnnSave.ConnectionString = &amp;quot;Provider = Microsoft.Jet.OLEDB.4.0;&amp;quot; &amp;amp; &amp;quot;Data Source =&amp;quot; &amp;amp; frmReportPg1!lblDbasePath.Caption
    cnnSave.Open

&amp;#39;Delete all records from Field &amp;quot;Parts&amp;quot; so field is clear for new List to be saved
    cnnSave.Execute &amp;quot;delete * from tbl_partslist&amp;quot;


&amp;#39;Save new parts list from set-up page to database

    Set rsSavePartsToDBase = New ADODB.Recordset
    Dim i As Integer
    Dim sArray() As String
    
     sArray = Split(PListText.Text, vbCrLf)
     For i = 0 To UBound(sArray)
         rsSavePartsToDBase.Open &amp;quot;insert into tbl_partslist (parts) values (&amp;#39;&amp;quot; &amp;amp; sArray(i) &amp;amp; &amp;quot;&amp;#39;)&amp;quot;, cnnSave, adOpenKeyset, adLockPessimistic
     Next i


    Set rsSavePartsToDBase = Nothing
    Set cnnSave = Nothing
&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If anyone can tell me whats wrong with the code it would be much appreciated.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;SKM&lt;/p&gt;&lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('4a514ed35aa043d59b754f0e4b814ec6')
&lt;/script&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Parameter error converting string to decimal...</title><link>http://vbcity.com/forums/thread/723675.aspx</link><pubDate>Sun, 05 Feb 2023 21:57:53 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723675</guid><dc:creator>Steve Light</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723675.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=33&amp;PostID=723675</wfw:commentRss><description>&lt;link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"&gt;&lt;/link&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushVb.js"&gt;&lt;/script&gt;
&lt;p&gt;I don&amp;#39;t know what I am missing but I am getting the &amp;quot; Failed to convert parameter value from a string to a decimal&amp;quot; when I am trying to INSERT data.&lt;/p&gt;
&lt;p&gt;I have a access database with a table that has decimal fields. I am using decimal field because I need to store a number &lt;/p&gt;
&lt;p&gt;like xx.xx. &lt;/p&gt;
&lt;p&gt;The field is set as:&lt;/p&gt;
&lt;p&gt;Field size as Decimal&lt;/p&gt;
&lt;p&gt;Precision as 4&lt;/p&gt;
&lt;p&gt;Decimal places as 2&lt;/p&gt;
&lt;p&gt;This is the parameter I am using. I have tried many ways I have found on internet search but none work.&lt;/p&gt;
&lt;p&gt;&lt;pre name="bbf66eab15254ad68d6e9729925a6989" class="VB.NET"&gt;
.Parameters.Add(New System.Data.OleDb.OleDbParameter(&amp;quot;@RateUnitRate1&amp;quot;, System.Data.OleDb.OleDbType.Decimal, 4, CType(tbRateUnitRate1.Text.Trim, Decimal)))
&lt;/pre&gt; &lt;/p&gt;
&lt;p&gt;I know the textbox has a potential decimal value because when I check it with,&lt;/p&gt;
&lt;p&gt;&lt;pre name="f7c161c1f9eb4a78a54b35781ce3e95b" class="VB.NET"&gt;
Dim rate As Decimal
        If Not Decimal.TryParse(tbRateUnitRate1.Text, rate) Then
            &amp;#39;Textbox does not contain a decimal number - do whatever you think is appropriate
            MsgBox(&amp;quot;Not a valid input&amp;quot;)
            tbRateUnitRate5.Text = &amp;quot;&amp;quot;
            tbRateUnitRate5.Focus()
            Exit Sub
        End If
        rate = CType(tbRateUnitRate5.Text.Trim, Decimal)
        MsgBox(rate.ToString)
&lt;/pre&gt; &lt;/p&gt;
&lt;p&gt;I get a value of 3.50.&lt;/p&gt;
&lt;p&gt;What am is missing.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('bbf66eab15254ad68d6e9729925a6989')
dp.SyntaxHighlighter.HighlightAll('f7c161c1f9eb4a78a54b35781ce3e95b')
&lt;/script&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to handle a blank textbox that won't let me exit the form.</title><link>http://vbcity.com/forums/thread/723673.aspx</link><pubDate>Fri, 27 Jan 2023 21:36:40 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723673</guid><dc:creator>Steve Light</dc:creator><slash:comments>1</slash:comments><comments>http://vbcity.com/forums/thread/723673.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=33&amp;PostID=723673</wfw:commentRss><description>&lt;link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"&gt;&lt;/link&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushVb.js"&gt;&lt;/script&gt;
&lt;p&gt;I have a CUDA form that I use to add meter readings from customers. It contains a EXIT button, multiple text boxes. One of the text boxes is the variable that I use to find the meter information. When I when I want to exit the form and the textbox is blank and has focus then the Leave event is fired. &lt;/p&gt;
&lt;p&gt;I have been trying to add code to stop the rest of the event from executing but I have been unsuccessful. &lt;/p&gt;
&lt;p&gt;Please give me some advise to what I am missing.&lt;/p&gt;
&lt;p&gt;Below is one of my attempts that doesn&amp;#39;t work. It catches the blank text but doesn&amp;#39;t execute the &amp;quot;Disposal&amp;quot;. &lt;/p&gt;
&lt;p&gt;&lt;pre name="6fcf571692b049a882d1b971af28cb0d" class="VB.NET"&gt;
Private Sub tbReadMeterNo_Leave(sender As Object, e As EventArgs) Handles tbReadMeterNo.Leave


        If tbReadMeterNo.Text = &amp;quot;&amp;quot; Then
            MsgBox(&amp;quot;ReadMeterNo is empty&amp;quot;)
me.Dispose
        End If

        Try
            Call connection()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical)
                errornumber = 165 &amp;#39;Assigned error number for logging &amp;amp; debugging.
                clsLogFile = New LogFile(ex.Message, errornumber)
            End Try

            Try
            Dim command = New OleDb.OleDbCommand
            Dim drMeter As OleDbDataReader = Nothing

                With cm
                    .Connection = con
                    .CommandText = &amp;quot;SELECT * FROM tblMeter WHERE MeterNo = @MeterFindString&amp;quot;
                    Try
                        .Parameters.Clear()
                        .Parameters.Add(&amp;quot;@MeterFindString&amp;quot;, OleDbType.Integer).Value = CInt(tbReadMeterNo.Text)
                    Catch ex As Exception
                        MsgBox(ex.Message, MsgBoxStyle.Critical) &lt;span style="background-color:#000000;"&gt; &amp;#39;&amp;lt;----- This kicks an error &amp;quot;Conversion from string &amp;quot;&amp;quot; to type &amp;#39;Interger&amp;#39; is not valid.&amp;quot;&lt;/span&gt;
&lt;/pre&gt; &lt;/p&gt;
&lt;p&gt;I know why the error happens. How do I code around it.?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('6fcf571692b049a882d1b971af28cb0d')
&lt;/script&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>A Very happy New Year 2023!</title><link>http://vbcity.com/forums/thread/723672.aspx</link><pubDate>Sat, 31 Dec 2022 07:38:46 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723672</guid><dc:creator>HARISH</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723672.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=37&amp;PostID=723672</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;span style="color:#ff00ff;"&gt;&lt;b&gt;&lt;i&gt;Wishing All Vbcity community members ...&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-size:medium;"&gt;&lt;span style="color:#0000ff;"&gt;A very happy and prosperous new year 2023!&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Read Binary File into ListBox Problem</title><link>http://vbcity.com/forums/thread/723666.aspx</link><pubDate>Mon, 15 Aug 2022 21:59:37 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723666</guid><dc:creator>Steve B</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723666.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=42&amp;PostID=723666</wfw:commentRss><description>&lt;link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"&gt;&lt;/link&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushVb.js"&gt;&lt;/script&gt;
&lt;p&gt;&lt;span&gt;Hi, Haven&amp;#39;t been here for years&lt;img src="http://vbcity.com/emoticons/emotion-2.gif" alt="Big Smile" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Been trying everything to open a binary file into a listbox&lt;/span&gt;&lt;br /&gt;&lt;span&gt;and basically just getting a 0 in the box or with the code below&lt;/span&gt;&lt;br /&gt;&lt;span&gt;at the line = listBox1.Items.Add(br.ReadBytes(((int)br.BaseStream.Length)));&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I will get Byte[]Array in the box, with the streamreader code below that I get&lt;/span&gt;&lt;br /&gt;&lt;span&gt;some binary code in the box, really stuck and need help.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Steve&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre name="faf90269c32e46129c15f2b8980a5d98" class="VB.NET"&gt;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{

string filename = openFileDialog1.FileName;
FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
br.BaseStream.Position = 0;
for (int i = 0; i &amp;lt; br.BaseStream.Length; i++)
{
listBox1.BeginUpdate();
listBox1.Items.Clear();
listBox1.Items.Add(br.ReadBytes(((int)br.BaseStream.Length)));
listBox1.EndUpdate();

}
br.Close();
fs.Close();
///StreamReader streamReader = new StreamReader(filename);
///listBox1.Items.Clear();
/// List&amp;lt;string&amp;gt; lines = new List&amp;lt;string&amp;gt;();
/// string line;
/// while ((line = streamReader.ReadLine()) != null)
/// { listBox1.Items.Add(line); }

}
}
&lt;/pre&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('faf90269c32e46129c15f2b8980a5d98')
&lt;/script&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>INSET VALUE IN COMBOBOX HTML PAGE </title><link>http://vbcity.com/forums/thread/723664.aspx</link><pubDate>Tue, 11 Jan 2022 14:30:08 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723664</guid><dc:creator>sal21 sal21</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723664.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=26&amp;PostID=723664</wfw:commentRss><description>&lt;p&gt;&lt;span&gt;based the link:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://anagrafe.cng.it/anagrafe/geometri.aspx" rel="nofollow"&gt;http://anagrafe.cng.it/anagrafe/geometri.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;how to insert value from MyVar=&amp;quot;LIVORNO&amp;quot; in combobox (collegio), and click on button &amp;quot;cerca geometri&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;tks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Sorry but really urgent.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Update connectionString at runtime</title><link>http://vbcity.com/forums/thread/723662.aspx</link><pubDate>Thu, 23 Dec 2021 22:22:42 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723662</guid><dc:creator>Donald Neisler</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723662.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=33&amp;PostID=723662</wfw:commentRss><description>&lt;link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"&gt;&lt;/link&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt;
&lt;script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushVb.js"&gt;&lt;/script&gt;
&lt;p&gt;I am attempting to update my applications connectionString and runtime, and it is giving me problems. Any assistance is greatly appreciated.&lt;/p&gt;
&lt;p&gt;&lt;pre name="991d7e39a6cd45828eb4cce278e8b7f9" class="VB.NET"&gt;
Public Sub SaveConnectionString(ByVal conString As String)
        Dim name As String = &amp;quot;MyDatabaseConnectionString&amp;quot;
        Dim config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
        Dim section = CType(config.GetSection(&amp;quot;connectionStrings&amp;quot;), ConnectionStringsSection)
        section.ConnectionStrings(name).ConnectionString = conString
        config.Save(ConfigurationSaveMode.Modified)
        ConfigurationManager.RefreshSection(&amp;quot;connectionStrings&amp;quot;)

 End Sub
&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I get a &amp;quot;System.NullReferenceException: &amp;#39;Object reference not set to an instance of an object.&amp;#39;&amp;quot; on line 5.&lt;/p&gt;&lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('991d7e39a6cd45828eb4cce278e8b7f9')
&lt;/script&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Date column in a datagridview</title><link>http://vbcity.com/forums/thread/723656.aspx</link><pubDate>Wed, 27 Oct 2021 14:21:39 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723656</guid><dc:creator>Michael Newman</dc:creator><slash:comments>1</slash:comments><comments>http://vbcity.com/forums/thread/723656.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=33&amp;PostID=723656</wfw:commentRss><description>&lt;p&gt;Many years ago I had a problem with a date column in a data bound datagridview.&amp;nbsp; When the application was running and a new row was selected, the date column automatically displayed the system date.&amp;nbsp; That is what I wanted it to do.&amp;nbsp; The problem was that if you did not specifically select a date - even if it was today&amp;#39;s date - it would not be save to the database.&amp;nbsp; The cell was left blank.&amp;nbsp; I did find an answer on the web but it has been lost.&lt;/p&gt;
&lt;p&gt;The frustrating part of this is that I have had 2 computers crash on me within a few days of each other resulting in the loss of the solution to this problem.&amp;nbsp; All that I can remember is that a new sub with only a few lines were used in the code to force the column to automatically select the computer&amp;#39;s system date.&amp;nbsp; No selection required by the user.&lt;/p&gt;
&lt;p&gt;Can anyone help please?&amp;nbsp; I have been searching on the web for over a day and cannot find the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Load Event Aborting</title><link>http://vbcity.com/forums/thread/723654.aspx</link><pubDate>Tue, 19 Oct 2021 16:51:33 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723654</guid><dc:creator>silverblatt</dc:creator><slash:comments>1</slash:comments><comments>http://vbcity.com/forums/thread/723654.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=33&amp;PostID=723654</wfw:commentRss><description>&lt;p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;In a VB.Net 2017 Windows form application, so far I have only a
splash form and a main form.&lt;span&gt;&amp;nbsp; &lt;/span&gt;When the
user clicks a button on the splash form or a ten second timer fires (whichever
occurs first) the splash form runs the AllDone() sub, which opens the main form
and then closes itself.&lt;span&gt;&amp;nbsp; &lt;/span&gt;Here&amp;#39;s the
relevant code in the splash form:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Private&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Sub&lt;/span&gt;&lt;span&gt; AllDone()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Timer1.Enabled = &lt;/span&gt;&lt;span&gt;False&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;frmMain.Show()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;Me&lt;/span&gt;&lt;span&gt;.Close()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;End&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Sub&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Here&amp;#39;s the relevant code in the main form:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Imports&lt;/span&gt;&lt;span&gt; System.Data.SqlClient&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;...&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Private&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Sub&lt;/span&gt;&lt;span&gt; frmMain_Load(sender &lt;/span&gt;&lt;span&gt;As&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Object&lt;/span&gt;&lt;span&gt;, e &lt;/span&gt;&lt;span&gt;As&lt;/span&gt;&lt;span&gt; EventArgs) &lt;/span&gt;&lt;span&gt;Handles&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;MyBase&lt;/span&gt;&lt;span&gt;.Load&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&amp;#39;display version
information&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;Me&lt;/span&gt;&lt;span&gt;.Text = &lt;/span&gt;&lt;span&gt;&amp;quot;Referral
Tracking - Version &amp;quot;&lt;/span&gt;&lt;span&gt; &amp;amp; My.Application.Info.Version.ToString&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&amp;#39;open database
connection&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Conn.ConnectionString =
ConnString&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Conn.Open()&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MsgBox(&lt;/span&gt;&lt;span&gt;&amp;quot;Connection
State: &amp;quot;&lt;/span&gt;&lt;span&gt; &amp;amp; Conn.State)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;End&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Sub&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Conn and ConnString are defined in a separate module as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Imports&lt;/span&gt;&lt;span&gt; System.Data.SqlClient&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;...&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Public&lt;/span&gt;&lt;span&gt; Conn &lt;/span&gt;&lt;span&gt;As&lt;/span&gt;&lt;span&gt; SqlConnection = &lt;/span&gt;&lt;span&gt;New&lt;/span&gt;&lt;span&gt; SqlConnection&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;Public&lt;/span&gt;&lt;span&gt; ConnString &lt;/span&gt;&lt;span&gt;As&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;String&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;[actual connection string]&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;I&amp;#39;ve
used this approach successfully in other projects.&lt;span&gt;&amp;nbsp; &lt;/span&gt;But in this particular project, it doesn&amp;#39;t
work.&lt;span&gt;&amp;nbsp; &lt;/span&gt;When frmMain_Load() runs, only its
first two statements execute, then execution returns to AllDone() and the
remaining two statements in frmMain_Load() never execute.&lt;span&gt;&amp;nbsp; &lt;/span&gt;No error is raised and the connection is not
actually opened.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;What
am I doing wrong?&lt;/span&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>TreeView BackgroundImage</title><link>http://vbcity.com/forums/thread/723653.aspx</link><pubDate>Fri, 08 Oct 2021 15:58:46 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723653</guid><dc:creator>Tim Alvord</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723653.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=42&amp;PostID=723653</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to add a BackgroundImage to a TreeView. It looks like the only way this will work is to Inherit from TreeView and override OnPaintBackground(System.Windows.Forms.PaintEventArgs pevent). If I do this it works, but the nodes don&amp;#39;t get drawn. Even though the code that sets the StateImageIndex is getting executed. I assume that I must do all the node drawing myself as well? Does anyone have an example they can show me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Is there a *.dll net 4.0 library that reads QR codes for webcams in C# ?</title><link>http://vbcity.com/forums/thread/723651.aspx</link><pubDate>Fri, 25 Jun 2021 02:05:23 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723651</guid><dc:creator>dongtrien</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723651.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=61&amp;PostID=723651</wfw:commentRss><description>&lt;p&gt;&lt;span lang="en" class="VIiyi"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Almost all libraries that read QR codes via webcam use net 4.5 or higher.&lt;/span&gt;&lt;/span&gt; &lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;I want to find a QR code reader library with net version 4.0 ?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How do I update the Keys in the app.config file at runtime ?</title><link>http://vbcity.com/forums/thread/723650.aspx</link><pubDate>Thu, 17 Jun 2021 04:22:47 GMT</pubDate><guid isPermaLink="false">921a0936-6df9-4a08-8006-68f3b1747f32:723650</guid><dc:creator>dongtrien</dc:creator><slash:comments>0</slash:comments><comments>http://vbcity.com/forums/thread/723650.aspx</comments><wfw:commentRss>http://vbcity.com/forums/commentrss.aspx?SectionID=61&amp;PostID=723650</wfw:commentRss><description>&lt;p&gt;I found some code examples that update the keys in the app.config file when running without error and not updating, why the code does not update, see my code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;file app.config&lt;/p&gt;
&lt;p&gt;&lt;blockquote style="overflow-x: scroll;"&gt;&lt;pre style="margin: 0px;"&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;configuration&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;lt;appSettings&amp;gt;&lt;span&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;add key=&amp;quot;FormatImage&amp;quot; value=&amp;quot;Jpg&amp;quot; /&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;add key=&amp;quot;LogFile&amp;quot; value=&amp;quot;C:\Windows\Log&amp;quot; /&amp;gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;lt;/appSettings&amp;gt; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;lt;/configuration&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;blockquote style="overflow-x: scroll;"&gt;&lt;pre style="margin: 0px;"&gt;&lt;/p&gt;
&lt;p&gt;private void cmdUpdate_Click(object sender, EventArgs e)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EditAppSetting(&amp;quot;LogFile&amp;quot;, &amp;quot;D:\Office2010&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;public static void EditAppSetting(string key, string value)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; config.AppSettings.Settings[key].Value = value;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; config.Save(ConfigurationSaveMode.Modified);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ConfigurationManager.RefreshSection(&amp;quot;appSettings&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception ex)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MessageBox.Show(&amp;quot;Error update file App.config: &amp;quot; + ex.Message, &amp;quot;Th&amp;ocirc;ng b&amp;aacute;o kiểm tra !&amp;quot;, MessageBoxButtons.OK, MessageBoxIcon.Question);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>