Now, unfortunately, due to the fact that when starting / uninstalling a WinCE Usb device, it appears through WindowsMessages, I have to make sure that a certain (non-user) component is not created in the background thread. I would like to claim this with an exception, but I don't have enough code to approve.
This component creates MessageWindow * and uses it to receive received or deleted usb messages. The problem is that someone creates this component in the background thread (not necessarily, IsBackground = true), when the thread leaves the window, it will be destroyed.
Any ideas?
* aside, I still donβt know why Form does not inherit from this class
Update
I think my version 1 was not very clear. So this is v2.
When you create a MessageWindow or form in this case in the stream, when this stream exits the window / form, it will be destroyed.
My component creates a "hidden" message box to intercept some important events, ergo, I do not want it to be destroyed. So I have to somehow make sure that the code that creates the form works in the "Main User Interface" thread.
If possible, I would like to avoid passing a link to the "main" form to this component, since it (architecturally speaking) should be a few miles from the user interface.
Update
Moving the registration issue to a separate Q.
Quibblesome May 05 '09 at 3:17 p.m. 2009-05-05 15:17
source share