nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.54k stars 132 forks source link

enaml Window icons show up in window titlebar but not in Windows 7 taskbar #68

Closed jason-s closed 11 years ago

jason-s commented 11 years ago

See my code in https://github.com/nucleic/enaml/issues/65

It adds an icon that shows up in the window titlebar; but the icon that shows up in the taskbar is this: image

I am using Anaconda Python 1.6.0 with enaml 0.7.19 on Windows 7.

jason-s commented 11 years ago

Never mind, the problem is not in enaml but the way Windows 7 works.

I got this solution from http://qt-project.org/forums/viewthread/28752

    if (os.name == 'nt'):
        # This is needed to display the app icon on the taskbar on Windows 7
        import ctypes
        myappid = 'MyOrganization.MyGui.1.0.0' # arbitrary string
        ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)