I am currently working on an access control program in C # and I am faced with the problem of blocking windows. The initial idea that I came up with is the usual black shape above the position given by the handle to the IntPtr window of the process. The problem is that smoothly updating the position of the form and the z-index of the position (I do not want it to be at the top). I also noticed a ridiculously high use of resources with my solution, as I used a loop to constantly check the position.
So, why I ask: what would be the best solution for this, without having large resources? The entry point is simply the name of the running process.
Currently, the idea blocks only browsers (IE: a school application to prevent distraction during an active lecture).
Additional Information:
I do not want to close the window my own application, I try to hide hidden windows from other processes.
My application is not a virus / annoying program, it is mainly to prevent the use of potentially distracting applications in the school environment. He lectured on a school laboratory computer.
I am now pulling out the main window from the process, the process name of the browsers.
I can not completely turn off computers.
source
share