Results 1 to 3 of 3

Thread: A real Newbie question about forms...

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Location
    South Australia
    Posts
    3

    Question A real Newbie question about forms...

    Sorry for this question I am sure it has come up a few times already bu anyway...

    I am quite familiar with VB6 and have just install .Net.

    All I am trying to do is close one form and open the next??

    I seem to be able to open the next form ok but cant work out how to close the previous form behind it??

    in VB6 this was simple eg:

    Unload Me
    Form2.Show

    In .Net I have got as far as:

    Public Class frmSplash
    Inherits System.Windows.Forms.Form

    Dim Test As Form

    Private Sub pbxTitle01_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbxTitle01.Click


    Test = New frmMainMenu()
    Test.Show()

    End Sub

    End Class

    But as soon as I try and use a "Close" it simply closes everything???

    Can can someone point me in the right direction, sorry for the stupid question.


    Regards

    Merlyn

  2. #2
    Junior Member
    Join Date
    Mar 2003
    Posts
    21
    Hi,

    I had a similar problem last week and it nearly drove me mad.

    In my case the problem was the button I clicked on form1 had a DialogResult property of Cancel, and this seemed to close the first form.

    When I deleted the button and recreated it from scratch, the form worked okay. Maybe this might help you.

    Also, check this link in VB.Net help for more details on showing forms:

    ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbtskDisplayingModelessForm.htm


    Best regards,
    Liam.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Location
    South Australia
    Posts
    3

    Thumbs up

    Thanks Liam, will try it out...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width