<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic VB.NET showing Form2 from a Button3 Event from Form1 in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/vb-net-showing-form2-from-a-button3-event-from-form1/m-p/2610040#M67738</link>
    <description>Hi Everyone,&lt;BR /&gt;
&lt;BR /&gt;
I am really hung up on this one. I am trying to show Form2 from Form1. It throws a Call Stack error and a unhandled exception indicating that it cannot find the file Form2. In Solution Explorer, Form2 resides within the same project...SPC_REDO. The build warning is "'.ctor' is not a  valid identifier".&lt;BR /&gt;
&lt;BR /&gt;
Public Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click&lt;BR /&gt;
&lt;BR /&gt;
'Dim Form2 As Form2 = New Form2()&lt;BR /&gt;
&lt;BR /&gt;
'Dim Form1 As Form1 = New Form1()&lt;BR /&gt;
&lt;BR /&gt;
'Frm = New SPC_REDO.Form2()&lt;BR /&gt;
&lt;BR /&gt;
'Application.ShowModalDialog(Form2)&lt;BR /&gt;
&lt;BR /&gt;
Me.Hide()&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
'F2 = New Form2&lt;BR /&gt;
&lt;BR /&gt;
'F2.ShowDialog()&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
'Frm.Show()&lt;BR /&gt;
&lt;BR /&gt;
Form2.Show()&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
This is the code and notice I have tried different things to locate Form2. When I google, various forums indicate that this is a glitch with VS2008. And it is also a glitch with VS2010. This should be fundamental don't you think...but it gets hung up.&lt;BR /&gt;
&lt;BR /&gt;
If you have the time shoot me back any advise? I would appreciate it.&lt;BR /&gt;
&lt;BR /&gt;
THX,&lt;BR /&gt;
not.testee

Edited by: not.testee on Jan 3, 2010 3:19 PM</description>
    <pubDate>Sun, 03 Jan 2010 15:18:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-03T15:18:41Z</dc:date>
    <item>
      <title>VB.NET showing Form2 from a Button3 Event from Form1</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-showing-form2-from-a-button3-event-from-form1/m-p/2610040#M67738</link>
      <description>Hi Everyone,&lt;BR /&gt;
&lt;BR /&gt;
I am really hung up on this one. I am trying to show Form2 from Form1. It throws a Call Stack error and a unhandled exception indicating that it cannot find the file Form2. In Solution Explorer, Form2 resides within the same project...SPC_REDO. The build warning is "'.ctor' is not a  valid identifier".&lt;BR /&gt;
&lt;BR /&gt;
Public Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click&lt;BR /&gt;
&lt;BR /&gt;
'Dim Form2 As Form2 = New Form2()&lt;BR /&gt;
&lt;BR /&gt;
'Dim Form1 As Form1 = New Form1()&lt;BR /&gt;
&lt;BR /&gt;
'Frm = New SPC_REDO.Form2()&lt;BR /&gt;
&lt;BR /&gt;
'Application.ShowModalDialog(Form2)&lt;BR /&gt;
&lt;BR /&gt;
Me.Hide()&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
'F2 = New Form2&lt;BR /&gt;
&lt;BR /&gt;
'F2.ShowDialog()&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
'Frm.Show()&lt;BR /&gt;
&lt;BR /&gt;
Form2.Show()&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
This is the code and notice I have tried different things to locate Form2. When I google, various forums indicate that this is a glitch with VS2008. And it is also a glitch with VS2010. This should be fundamental don't you think...but it gets hung up.&lt;BR /&gt;
&lt;BR /&gt;
If you have the time shoot me back any advise? I would appreciate it.&lt;BR /&gt;
&lt;BR /&gt;
THX,&lt;BR /&gt;
not.testee

Edited by: not.testee on Jan 3, 2010 3:19 PM</description>
      <pubDate>Sun, 03 Jan 2010 15:18:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-showing-form2-from-a-button3-event-from-form1/m-p/2610040#M67738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-03T15:18:41Z</dc:date>
    </item>
  </channel>
</rss>

