Hello,
I had a strange problem yesterday, where a Windows app [that had worked for
months] suddenly froze up on page load. I stepped through the source code,
and it looked like Application.DoEvents() was causing the problem.
After some more digging, I found that there might be a conflict of competing
threads or processes if they lock in at the same priority. (Note that I'm
not even using multithreading in my application.)
I started my app once again, and it hung. I went into Task Manager, raised
the process priority, and it zoomed along like nothing ever went wrong in
the first place. As a temporary fix, I placed the following code in my
PageLoad to programatically raise the process priority:
\\\
' (Assumes Imports System.Diagnostics.Process)
' Set the process priority.
Dim ThisProcess As Process = GetCurrentProcess()
ThisProcess.PriorityClass = ProcessPriorityClass.High
///
Does anyone know what could have caused this in the first place?
Thank you,
Eric