<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How To Pass Data Between Forms in VB.NET</title>
	<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/</link>
	<description>Articles on VB.NET and Software Development Team Leadership</description>
	<pubDate>Wed, 20 Aug 2008 12:13:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Gina Cresse</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1081</link>
		<author>Gina Cresse</author>
		<pubDate>Fri, 18 Apr 2008 01:27:42 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1081</guid>
		<description>Followup: Regarding the above post, I discovered my problem was because I was passing the arguments to the Public Sub New in the designer.vb file instead of adding a Public Sub New(arguments) to the form.vb file.  Once I re-arranged that code, everything works perfectly now.

Thanks!</description>
		<content:encoded><![CDATA[<p>Followup: Regarding the above post, I discovered my problem was because I was passing the arguments to the Public Sub New in the designer.vb file instead of adding a Public Sub New(arguments) to the form.vb file.  Once I re-arranged that code, everything works perfectly now.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gina Cresse</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1080</link>
		<author>Gina Cresse</author>
		<pubDate>Fri, 18 Apr 2008 00:05:33 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1080</guid>
		<description>Great article.  I've used your method with much success.  Now, though, I've run into a problem and I wonder if you have an answer.  I've added the arguments to the Sub New sub in a form that contains several Public subs that get called from other forms.  

For example: In Form1 I have code that calls a public Sub in Form2, but once I changed Form2 to accept arguments, I can no longer access those public subs in Form2 from Form1.  I was able to solve that (sort of) by declaring the public subs as Shared, but that has caused a problem when the Public Shared sub is showing Form3.  It used to create a new instance of Form3 each time, but now it opens only 1 Form3 and shares it between Form1 and Form2, which I don't want.

I guess my question is, why do I lose the ability to call Form2.SomePublicSub from Form1 after I change Form2 to accept arguments?  

Thanks for a great article.  I give it a 10+.</description>
		<content:encoded><![CDATA[<p>Great article.  I&#8217;ve used your method with much success.  Now, though, I&#8217;ve run into a problem and I wonder if you have an answer.  I&#8217;ve added the arguments to the Sub New sub in a form that contains several Public subs that get called from other forms.  </p>
<p>For example: In Form1 I have code that calls a public Sub in Form2, but once I changed Form2 to accept arguments, I can no longer access those public subs in Form2 from Form1.  I was able to solve that (sort of) by declaring the public subs as Shared, but that has caused a problem when the Public Shared sub is showing Form3.  It used to create a new instance of Form3 each time, but now it opens only 1 Form3 and shares it between Form1 and Form2, which I don&#8217;t want.</p>
<p>I guess my question is, why do I lose the ability to call Form2.SomePublicSub from Form1 after I change Form2 to accept arguments?  </p>
<p>Thanks for a great article.  I give it a 10+.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jfrankcarr</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1070</link>
		<author>jfrankcarr</author>
		<pubDate>Mon, 14 Apr 2008 13:12:32 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1070</guid>
		<description>Hi Paul,

Without seeing the code it's difficult to tell exactly what's going wrong. Typically you'll see this kind of thing happen when either a new object/control instance is created or a new array or dataset is created accidentally. Creating objects in different threads can also cause this to happen. 

The best thing to do is just walk through your code to see if there is any place where you might be accidentally initializing an object. If nothing stands to you, debug it and step through it. You'll probably find the culprit lines of code when you do that.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>Without seeing the code it&#8217;s difficult to tell exactly what&#8217;s going wrong. Typically you&#8217;ll see this kind of thing happen when either a new object/control instance is created or a new array or dataset is created accidentally. Creating objects in different threads can also cause this to happen. </p>
<p>The best thing to do is just walk through your code to see if there is any place where you might be accidentally initializing an object. If nothing stands to you, debug it and step through it. You&#8217;ll probably find the culprit lines of code when you do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1069</link>
		<author>Paul</author>
		<pubDate>Mon, 14 Apr 2008 12:46:43 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-1069</guid>
		<description>I'm trying to load a combo box and a list box in a form from code in a module but the data never gets there. Form-to-form works ok, it's only module to form that doesn't. Any ideas?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to load a combo box and a list box in a form from code in a module but the data never gets there. Form-to-form works ok, it&#8217;s only module to form that doesn&#8217;t. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: il beppe</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-974</link>
		<author>il beppe</author>
		<pubDate>Tue, 08 Jan 2008 14:54:37 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-974</guid>
		<description>very good, nice technics the overload of the show method. Txs</description>
		<content:encoded><![CDATA[<p>very good, nice technics the overload of the show method. Txs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GoWin</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-972</link>
		<author>GoWin</author>
		<pubDate>Fri, 04 Jan 2008 05:08:17 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-972</guid>
		<description>How to pass FormId and ControlID as paramenter to other Class in .NET</description>
		<content:encoded><![CDATA[<p>How to pass FormId and ControlID as paramenter to other Class in .NET</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-960</link>
		<author>George</author>
		<pubDate>Fri, 14 Dec 2007 18:34:02 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-960</guid>
		<description>Okay... this code goes into the second form, the form where the data will be displayed. Now it works.

Public Sub New(ByVal customerOrder As Order)
    Me.InitializeComponent()
    LoadOrder(customerOrder)
End Sub</description>
		<content:encoded><![CDATA[<p>Okay&#8230; this code goes into the second form, the form where the data will be displayed. Now it works.</p>
<p>Public Sub New(ByVal customerOrder As Order)<br />
    Me.InitializeComponent()<br />
    LoadOrder(customerOrder)<br />
End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-959</link>
		<author>George</author>
		<pubDate>Fri, 14 Dec 2007 18:14:48 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-959</guid>
		<description>Same problem: Too many arguments to "Public Sub Show()"</description>
		<content:encoded><![CDATA[<p>Same problem: Too many arguments to &#8220;Public Sub Show()&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jfrankcarr</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-957</link>
		<author>jfrankcarr</author>
		<pubDate>Wed, 12 Dec 2007 19:24:59 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-957</guid>
		<description>Hi Paul,

Without seeing your code, it's hard to tell. I'd guess that the overload isn't coded correctly so the compiler isn't seeing it. That's the first place I'd look if I was debugging the problem in my code.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>Without seeing your code, it&#8217;s hard to tell. I&#8217;d guess that the overload isn&#8217;t coded correctly so the compiler isn&#8217;t seeing it. That&#8217;s the first place I&#8217;d look if I was debugging the problem in my code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul mason</title>
		<link>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-956</link>
		<author>Paul mason</author>
		<pubDate>Wed, 12 Dec 2007 12:46:21 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/28/how-to-pass-data-between-forms-in-vbnet/#comment-956</guid>
		<description>Hi, the article explains this concept very well so thank you.
The only problem that i'm having is that i keep getting Too many arguments to 'Public Sub Show()'.	
Any ideas what might be causeing that?
I've used the same code that you used above.
Thanks
Paul.</description>
		<content:encoded><![CDATA[<p>Hi, the article explains this concept very well so thank you.<br />
The only problem that i&#8217;m having is that i keep getting Too many arguments to &#8216;Public Sub Show()&#8217;.<br />
Any ideas what might be causeing that?<br />
I&#8217;ve used the same code that you used above.<br />
Thanks<br />
Paul.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
