I am writing an application that requires two displays: one for the control panel, the other for output. I have this: if there is only one display, the application shows both forms on it, but if there are two, the output form goes to the other. The problem is that this only happens when the application starts. In other words, if the application is already running before the second display is connected, nothing happens if the user does not send the output to the new display manually (provided that he knows how to do it). I want that when a new display is connected, the output form is automatically sent to him even while the application is running. I think this is due to polling the port in the stream, but I do not know how to do this. Can anyone help on how to do this? If there is a better solution, I will gladly welcome it.
(I would provide part of the code, but I type it from the phone)
afaolek
source share