Results 1 to 3 of 3

Thread: Question on form hiding and stuff

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    181

    Question on form hiding and stuff

    Hey! I'm trying to make an if statement that deals with if a certain form is hidden. Lets say I have two forms and I hide one of them (hide()). How can I say something like "If form1 is hidden then.... do this...." or "If form2 is hidden then.... do this"? any ideas? Should I just use a variable to keep track of that or is there a way to tell?

    John

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Question on form hiding and stuff

    The Form class has a Visible property that indicates exactly what the name suggests.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    Re: Question on form hiding and stuff

    Yes the visible property seems same as the show,hide .
    VB Code:
    1. Dim f2 As New Form2
    2.         If f2.Visible = False Then
    3.             MsgBox("hidden")
    4.         End If
    Godwin

    Help someone else with what someone helped you!

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