Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify Icon not loading/working in windows 7 #797

Open
kernelPanic0x opened this issue Feb 6, 2022 · 4 comments
Open

Notify Icon not loading/working in windows 7 #797

kernelPanic0x opened this issue Feb 6, 2022 · 4 comments

Comments

@kernelPanic0x
Copy link

Hi.

I'm in the making of a small program with walk. I want to create a balloon icon with notifications only with walk. I am uisng windows 10 to compile and develop. Everything works as expected on windows 10 but as soon as i move to a windows 7 VM to test (target machine for the program) I get an error stating "neither icon resource "assets/icon.ico" nor file "FULL_PATH/assets/icon.ico" could be found or the image format is not supported.

...
mw, err := walk.NewMainWindow()
chkErr(err)

icon, err := walk.Resources.Icon("assets/icon.ico")
chkErr(err)

ni, err := walk.NewNotifyIcon(mw)
chkErr(err)
defer ni.Dispose()

err = ni.SetIcon(icon)
chkErr(err)
...

It crashes on windows 7 on the icon, err := walk.Resources.Icon("assets/icon.ico") line...

Am I doing something wrong or is it a problem of windows 7? My VM is running windows 7 SP1 x64

@kernelPanic0x
Copy link
Author

Small update...

I've tested the build binary on windows 11 and it works fine there too. So I assume it is a windows 7 problem?

@nyrf
Copy link

nyrf commented Feb 28, 2022

I've got same error, do you have solved the problem?

@nyrf
Copy link

nyrf commented Feb 28, 2022

Update: use go embed and walk.NewIconFromImageForDPI can solve the issue

@clarkb7
Copy link

clarkb7 commented Jan 26, 2023

@lxn I think I found the cause of the issue. see the PR description in DataDog/datadog-agent#15275. Happy to provide more info and help with a fix but not sure how you want to approach it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants