Results 1 to 4 of 4

Thread: Visible status of form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2010
    Posts
    228

    Visible status of form

    Hi,
    I have a different kind of issue inside my code. I can not use my code as era. I have a simple code to make form drop from visible status but it is not working. I could not manage this problem.
    Thanks all

    //This is my code
    Code:
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.Visible = False
        End Sub
    End Class

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Visible status of form

    You can not do this to your main form as discussed here
    http://msdn.microsoft.com/en-us/libr...(v=vs.71).aspx

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

    Re: Visible status of form

    That page KI linked to is very old and a bit outdated. I would suggest:

    1. Set the form's WindowState to Minimized, either in the designer or in code after creating the instance.
    2. Set the form's ShowInTaskbar to False, either in the designer or in code after creating the instance.
    3. Handle the Shown event of the form, which is raised after the form is displayed for the first time.
    4. In the event handler, set the form's Visible to False and then change the other properties if desired.
    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

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2010
    Posts
    228

    Re: Visible status of form

    Why this information has changed inside vb.net that comes from VB1. it is old but does not allow to treat with this way

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