Glass control "CallbackOnCollectedDelegate" issue

  • Thread starter Thread starter J.A.G Productions - James
  • Start date Start date
J

J.A.G Productions - James

Guest
Hi guys!

So ive been working on a glass class that I found online and have modified the drawing of the controls to look smoother on the windows 10 glass controls. It works great until I open multiple windows, after the 3rd window is opened the program crashes.

Managed Debugging Assistant 'CallbackOnCollectedDelegate' : 'A callback was made on a garbage collected delegate of type 'BlurTest!WinUtils.WinAPI+WndProcDelegate::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.'

I have included the source and a image of the glass form, to replicate my issue:
I compile the code from the zip and click on the open new window button once to make a new window.
the program is stable. but once I open another 2 windows it always crashes with the above error.

any help would be greatly appreciated guys :) thanks!

Project:
271.5 KB file on MEGA

1618121.png

Continue reading...
 
Back
Top