Changing the application and taskbar icon - Python/Tkinter

后端 未结 5 2130
眼角桃花
眼角桃花 2020-12-17 17:12

I\'ve been working on a very simple python/tkinter script (a .pyw file) and I\'d like to change it\'s application icon (the \'file\' icon shown at the explorer window and th

5条回答
  •  失恋的感觉
    2020-12-17 17:35

    Another option on Windows would be the following:

    To your python code add the following:

    import ctypes
    
    myappid = 'mycompany.myproduct.subproduct.version' # arbitrary string
    ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
    

提交回复
热议问题