Click here to Skip to main content
15,908,775 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, how can I do automatic program update from system tray. I set update in specific time, but update not function if program is in system tray.
<pre> WindowState = FormWindowState.Minimized
        If Me.WindowState = FormWindowState.Minimized Then
            NotifyIcon1.Visible = True
            Me.Hide()
            NotifyIcon1.BalloonTipText = "Hi from right system tray"
            NotifyIcon1.ShowBalloonTip(500)
        End If


What I have tried:

WindowState = FormWindowState.Minimized
       If Me.WindowState = FormWindowState.Minimized Then
           NotifyIcon1.Visible = True
           Me.Hide()
           NotifyIcon1.BalloonTipText = "Hi from right system tray"
           NotifyIcon1.ShowBalloonTip(500)
       End If
Posted
Updated 7-Jun-19 1:51am

1 solution

Instead of putting the app in the tray and having it run all the time, why not use the Task Scheduler in Windows to run your update app at 06:00 every day? That way, you aren't clogging up the machine at all ...

Task Scheduler - Windows applications | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900