I have two applications that has a thread that continuously receives and sends data across a RS232 port. Is there any way to know when my app has been minimized or maximized so I can turn off and restart the comport, otherwise I have to completely close each app to run the other.