Results 1 to 3 of 3

Thread: vb.net A little help please

  1. #1
    zchoyt
    Guest

    vb.net A little help please

    I am new to this whole object oriented programming thing.

    Getting started:
    I have two froms in vb.net.
    I want to click on an object on form1 which will make form1 invisible and make form2 visible.

    The problem:
    On form1 I type:
    me.visible = false
    form2.

    The visible property of form2 is not visible. It shows members of its class. How do I get to it's properties from another form?

    VB.Net truly is differant in many many ways.

  2. #2
    zchoyt
    Guest

    Nevermind

    I figured it out.
    Dim frmTwo as Form2
    frmTwo.visible = true


    Stuff just aint the same!!!

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    30
    Seeing as VB.NET is now a true OO Language the old method of using Form2.Visible=True will not work as there is no active object loaded.

    To get around this Add a Module to your project and declare the following:-
    Public NewForm2 as New Form2

    Then in your code you can use:-
    NewForm2.Hide

    This is assuming that you have a form as your startup object.
    <! Ozki !>

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