Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

VB.NET SHOWING OF FORMS

I am very new to VB.Net after upgrading from VB6.

I have just created  new application,  and have a form set to start, on startup properties.
but can not seem to open another form using form1.show.  I have been told the below code should be correct but cannot seem to get it to work...  Can anyone help.

   Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Fm1 As Form1
        Fm1.Show()
        Me.Close()
    End Sub

This code is located in the coding for Form1 form....
0
SBrighty
Asked:
SBrighty
1 Solution
 
VBtomCommented:
If i understand you well you want to create a new form1 from inside form1 !???

Don't know what it's goog for, but if that's what you want to do, use Dim Fm1 As New Form1
0
 
SBrightyAuthor Commented:
I am actually tring to show an existing form called Form1
like you used to be able to in VB6.  When I use AS new Form1 it creates a new form...
0
 
twalgraveCommented:
0
 
CleanupPingCommented:
SBrighty:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now