Results 1 to 3 of 3

Thread: [RESOLVED] [2.0] Hiding a winform?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Resolved [RESOLVED] [2.0] Hiding a winform?

    For some reason i cant figure this out anymore...
    I want to completely hide my windows form and show an icon in tray area. For some reason the Hide() method or the visible property dont do any good.
    Ive tried setting the opacity to zero as well, but it still shows up when you press Alt Tab...
    is this related to .NET 2.0 changes any how?
    any win api calls suggested instead?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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

    Re: [2.0] Hiding a winform?

    I'm guessing that you are calling Hide or setting Visible in the Load event handler. That's no use because the Load event is raised BEFORE the form is displayed for the first time, so it is made visible at the end of the Load event handler no matter what. If you want a form to appear in the tray from the start then you should set its WindowState to Minimized and its ShowInTaskbar to False in the designer. You then handle the Shown event, which is raised AFTER the form is displayed for the first time, and call Hide or set Visible.
    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

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: [2.0] Hiding a winform?

    hey thanks!
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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