Results 1 to 5 of 5

Thread: a newbie question

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    Dgte. City
    Posts
    45

    Question a newbie question

    i just started using vb.net, and my question is - how do u show another form? (im using windows application in vb 6 platform)

    thanks...
    Mark_V

  2. #2
    Hyperactive Member
    Join Date
    Mar 2004
    Location
    Prato - Tuscany - Italy
    Posts
    461
    I'm not sure to understand well, but if your problem is 'to show a form', first of all you have to instance it :

    Dim FrmGoofy as new FormIdesignedYesterday

    then

    FrmGoofy.Show

    If you already use Vb6 it should be not too difficult...anyway I'm here if you need. Good job

    Live long and prosper (Mr. Spock)

  3. #3
    Junior Member
    Join Date
    May 2004
    Posts
    21
    ' Dim Form2 As New Form2()
    ' Form1.Show()
    ' Me.Hide()
    'Form2.Hide()

    something like that.

    i wanted a intro form with a button on it. the button is a enter button and when you click it, this takes you too the main form, i think the above code would go on the enter button but im not sure how you instance it in the other from?>

  4. #4
    Junior Member
    Join Date
    May 2004
    Posts
    21
    does anyone know it this is correct?

    i still can't get one main form to close and another one to show?


  5. #5
    Hyperactive Member
    Join Date
    Mar 2004
    Location
    Prato - Tuscany - Italy
    Posts
    461
    I'm not sure to understand exactly what you need, but if you are on the start form and you need to hide the start form (Form1) and to show a second Form (Form2) on the click event of a button, try this:

    VB Code:
    1. Dim FormAName As New Form2
    2.         Me.Hide()
    3.         FormAName.ShowDialog()
    4.         Me.Show()
    5.         FormAname.Close()
    6.         FormAName.Dispose()

    Form1 will disappear and Form2 will appear, when you click the button. Then when you'll close form2, using the x button in the right high corner, Form1 will appear again.
    Is it useful for you?
    Good job!
    Live long and prosper (Mr. Spock)

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