Quantcast
Channel: Questions in topic: "dll"
Viewing all articles
Browse latest Browse all 706

Why does this SUPER simple line of code take 35% or my processing power?

$
0
0
For my Job I am trying to create a Heartbeat program that monitors the status of interactives. In order to do this safely, I don't want clients closing out of the program, so I want to hide the window. This is the single line of code that causes 35% of my processing power to be used when I run it. **There is nothing in the scene and no other scripts.**: void OnApplicationFocus(bool hasFocus) { User32.ShowWindow(User32.GetActiveWindow(), 0); } Once you build your application, this code should immediately hide it. Now if you open Task Manager, you can see that when the application is hidden, it takes a lot of processing power. Anyone know why?

Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>