My main app UI is written in VB6. Part of the UI and logic is written in .NET visible using COM interop from VB6. I've created a .NET DLL and from that DLL, I show the Desktop Alert control. Everything works fine except that the Desktop Alert steals the focus from the VB6 form.
I know that this may not be a supported scenario but is there a way to prevent this behaviour?
Yes, VB6 is not a supported environment for our windows forms controls.
Try and call Infragistics.Win.Utilities.ForceNativeMessageFilter(); in the form's contructor or sometime at the start of your application before the desktop alert is instantiated to see if this addresses the behavior. I believe this forum post might interest you:
Thanks for the prompt response. Looks like the problem was a side effect caused by where I implemented the desktop alert. It was located in a .NET hidden form that was also doing extra work so I moved it into a .NET user control that I dropped into the main VB6 form and call iwth an event and bingo!, no more focus stealing.
Thank you for following up. I am glad to hear that you addressed the behavior. We look forward hearing from you again.