6

Is there a way to show the week number in the taskbar in Windows 10? I prefer it to be integrated in the Windows clock application that is showing in the taskbar anyway - directly or by left/right click. But at the moment I take any workaround including 3rd party software.

My current workaround is to open the calendar via the start menu (with week numbers enabled). So I don't need another solutions that opens a window which I manually have to close again.

2 Answers 2

5

You can use T-Clock. It supports Windows 10 since version 2.4.1. You can download the latest release here. Just extract then run, there's no installer

T-Clock calendar

After starting T-Clock you need to enable its calendar first right clicking on the clock > T-Clock options. In the Miscellaneous tab check on Use T-Clock's calendar and Show week numbers

T-Clock options

If you want official support please vote on Windows 10's Feedback Hub (installation of the Feedback Hup App is necessary). Many people have already reported that: https://aka.ms/AA5mk4r, https://aka.ms/AA7ujey, https://aka.ms/AA7ubxo

5
  • Thanks, I remember using T-Clock in Windows XP, I will try that.
    – Albin
    Mar 21, 2020 at 16:25
  • The Links to the Feedback Hub are great, I added a link to the Feedback Hub App which is required for the links.
    – Albin
    Mar 21, 2020 at 16:25
  • Worked fine, I used H:nn:ss\ndd.mm. ("W"Wi) as formatstring, this way I get two lines: time in the top line HH:MM:SS and date in the bottom line DD.MM. (W#). I'll gave you a +1. Haven't decided which answer should get the solution though. I tend to helpinghend since his solution doesn't require any 3rd party software, hope you don't mind.
    – Albin
    Jul 2, 2020 at 20:01
  • @Albin you're free to accept any answer that you like. That solution isn't free from "3rd party" software anyway as it still requires some software that's not included in Windows to compile the source code
    – phuclv
    Jul 5, 2020 at 11:22
  • And unfortunately, I couldn't get it to work. Since 3rd party is only a "side requirement" and you added the only working solution so far, I'll accept your answer for now.
    – Albin
    Jul 5, 2020 at 12:20
5

One option if you're really struggling, would be to create a small little application that is configured to run at startup that creates a notification tray icon.

Example

If you download Visual Studio 2019 Community version, you could create a new C# .Net Forms application with the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Globalization;

namespace WeekCounter
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MyCustomApplicationContext());
        } 
        private static void MessageBox(string v)
        {
            throw new NotImplementedException();
        }
    }

    public class MyCustomApplicationContext : ApplicationContext
    {     
        private NotifyIcon trayIcon;

        public MyCustomApplicationContext()
        {
            // Initialize Tray Icon
            trayIcon = new NotifyIcon()
            {
                Icon = WeekCounter.Properties.Resources.icon,
                Text = "WeekCounter",
                ContextMenu = new ContextMenu(new MenuItem[] {
                new MenuItem("Exit", Exit)
            }),
                Visible = true
            };

            trayIcon.MouseMove += new MouseEventHandler(notifyIcon1_MouseMove);
        }
        private void notifyIcon1_MouseMove(object sender, MouseEventArgs e)
        {
            CultureInfo myCI = new CultureInfo("en-US");
            Calendar myCal = myCI.Calendar;
            CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;
            DayOfWeek myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek;
            trayIcon.Text = "Time: " + DateTime.Now.ToString("MM/dd/yyyy h:mm:ss tt") + "\nWeek: " + myCal.GetWeekOfYear(DateTime.Now, myCWR, myFirstDOW);
        }

        void Exit(object sender, EventArgs e)
        {
            trayIcon.Visible = false;
            Application.Exit();
        }
    }
}

Note: Under the "Resources" for the project you can add a suitable ico file as an icon resource. It is referenced in the code as "icon" so the resource will need to be named that:

Icon = WeekCounter.Properties.Resources.icon

Adding icon resource

You could ensure the exe is run at startup by adding a reference to it under the registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 
4
  • Did you already have this (or most of it) ready, or did you make it just for this answer? This is an awesome approach, and the code could easily be utilized as a base for other similar applications. +1 Mar 21, 2020 at 15:02
  • 2
    Everyone should have Visual Studio ready to go given the wealth of examples that can copied, pasted and mutated. :) Thanks. Mar 21, 2020 at 15:08
  • Although it has quite some overhead I like the idea not having to replace the entire clock by a 3rd party app. I will give it a try...
    – Albin
    Mar 21, 2020 at 16:28
  • @HelpingHand do I have to use a project template? Or can I just create an empty project and add a c#-class (into which I paste your code)?
    – Albin
    Jul 3, 2020 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.