Results 1 to 8 of 8

Thread: Minimize to SysTray

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Minimize to SysTray

    I notice there are(and have been) quite a few queries on this topic.

    I think this would be a candidate for the CodeBank ?

    I think something as simple(to use) as -
    Icon loads into systray on Form_Load.
    When user clicks the Icon it shows the Form, if not showing.
    It hides the Form if it is showing.
    It has no right click popup menu.
    It does not require double click
    The Form never shows in the Taskbar.

    Just click to show Form, and click to hide Form.

    No menus (although a hidden popup menu in design mode, may be required to get it working ?)

    Is anyone aware of an example like that ?
    Rob C

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Minimize to SysTray

    How about any number of these?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Minimize to SysTray

    OOPs I'll check them out.

    In my defence, I did a search of this forum on 'Minimize to systray' and got two pages of results. But none of those were in the CodeBank.
    Rob C

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Minimize to SysTray

    Dont worry about it

    Also try a search in Classic VB forum for "SysTray" for other examples.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Minimize to SysTray

    Thanks,
    I settled on one of those that you linked to.

    It was a nice small one with only a single Form.
    I moved all of the SysTray stuff into a bas file.

    I have added that bas file to this project.
    Save a Screenshot

    I have provided the link back to the codebank original in 'my' (cough!) project
    The changes required to that project, to utilise the Bas file only took a few minutes.

    This approach should also answer some of the current questions regarding systray (eg no menu required etc)
    Rob C

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Minimize to SysTray

    For those that don't wish to download 'my' (cough!) project, I am attaching the original from the CodeBank.

    Actually it is a modified version of it, where I have moved much of the code, out of the Form and placed it into a bas file.

    All you have to do is copy the Bas file into your existing projects, and do some minor changes to your Form.
    When your project starts, it loads an Icon into the systray.
    You app does not need to be in the Taskbar (ever).

    Click systray icon to hide Form.
    Click systray icon to show Form.

    If you have never used an app that can hide/show that easily, trust me you, and your users will love that convenience.

    PS The link to the untouched original, is in the Bas file.
    Attached Files Attached Files
    Rob C

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Minimize to SysTray

    The click to hide and click to show, was ok, except you had to hide some Apps to see our Form.
    I have enhanced -
    Save a Screenshot
    to hopefully fix that inconvenience.

    The same solution can be blended into the project that was attached above.
    ( systray_but_code_now_in_bas.zip )
    Post here, if you want me to do it.
    Last edited by RobCrombie; Apr 30th, 2005 at 12:09 AM.
    Rob C

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Minimize to SysTray

    Sure. I thought that you did already. I also commented that you should include the jpeg.dll in the zip file. Lots of people will appreciate that.

    You could include our user names, also.

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