.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB.NET showing Form2 from a Button3 Event from Form1

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
304 Views, 0 Replies

VB.NET showing Form2 from a Button3 Event from Form1

Hi Everyone,

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".

Public Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

'Dim Form2 As Form2 = New Form2()

'Dim Form1 As Form1 = New Form1()

'Frm = New SPC_REDO.Form2()

'Application.ShowModalDialog(Form2)

Me.Hide()


'F2 = New Form2

'F2.ShowDialog()



'Frm.Show()

Form2.Show()

End Sub

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.

If you have the time shoot me back any advise? I would appreciate it.

THX,
not.testee Edited by: not.testee on Jan 3, 2010 3:19 PM
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost