Fixed the delegate to have the Unmanaged attribute

Now functions - fires the messagebox every iteration of the MainLoop