Brandon Dixon
Brandon Dixon

Reputation: 3

opening a second form in VB.Net

I'm trying to open up a second form in VB.Net after clicking a button. I have looked it up, however, what I found doesn't seem to be working. It doesn't open the form. Here are the relevant pieces of code.

 Dim Output As New frmOutput(intNormal, intChildren, intBonanza, intDiamond, intPictureFrame, intKite, intCrazyT, intLetterX, int2PostageStamp, intPick7, intJackpot, intSpecial, datToday)

    Private Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click

    Me.Close()
    Output.Show()
End Sub

I have the second form made, and everything, I have created a GUI, and some code behind it, and can't figure out why its not opening

If there are any other pieces of information you need, let me know, and ill gladly provide it.

Upvotes: 0

Views: 594

Answers (1)

You can't close the application (or form) before opening the other one switch the order of your commands

Output.Show()
Me.Close()

Upvotes: 1

Related Questions