I have a taskBarIcon element that extends the application context from which my entire user interface is constructed. This is because the initial functionality of the application was to start the background process and simply provide an icon to confirm that the application was running. However, now I am adding additional functions in the form of a menu that can be accessed by right-clicking on the icon, and since the main functionality works in one stream and the icon in the main stream, I am having problems accessing the icon in a simple case where you need to display a notification bubble. There are no other points where these two threads can access the same memory, so synchronization is not really a problem.
I'm used to Java, in which this process is much simpler. I read articles that I can find regarding the Invoke-Delegate dance, which is required for C #, but none of them are related to an object that extends the application context. My current implementation is too unpredictable to ensure production safety.
My question is this: how do I send a message to another process to display a notification bubble without disturbing the accessibility of the menu? In particular, a simple example with a user interface class extending the application context and the class in a separate thread calling the invocation method is very useful.
I really appreciate any help!
badPanda
source
share