简体   繁体   中英

C# Program runs fine, until minimized

I've never seen this issue before, and I'm not even sure if I'm posting in the correct place.

My Co-worker wrote a C# program (windows), that includes a web control. In that web control are a bunch of iFrames. Now, when the web control is populated (max 15 records), everything is fine. 99% system idle process. But once you minimize the program, boom, 99% process goes to the c# program and stays there!

If the web control is not populated. There is no issue with minimizing and maximizing the program.

There are no functions that run when the program is minimized or maximized, so there's nothing to debug...

The program is crashing on two computers, but on the rest (about 8 computers) it runs fine.

The two computers that "crash", are not very similar... so it's proving hard to find what may be causing the issue. One computer is xp, the other is windows 7, one is ie7, the other is ie8.

If anyone could point me in the right direction, or if anyone had a similar situation and has a solution, I'm all ear's and eye's!

I would attach Visual Studio to the "99% CPU" process, break all, and see what's going on in there. That's first step.

Doesn't Windows write inactive (ie minimised) application state to disk, to free up resources for active (non-minimised) windows?

One of the hooks / events called when you minimise the application could be causing IO hangs. You should get a diagnostics tool like Sysinternals Procmon to see if IO (or any other process) is hanging based on the minimise event.

Good luck. Chris.

So my co-worker didn't find the thorough answer as to why it was crashing, but it was crashing due to the .net Web control. He swapped out the control for a VB6 control and it now works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM