Link to home
Start Free TrialLog in
Avatar of lance_keen
lance_keen

asked on

not responding

I have heavy number crunching application. When I let it run, it always freezes eventually,  and when I hit ctl-alt-del, it always shows my program as 'not responding'.  I have printed out the results of the output to determine the last 'active' point, and then started stepping through from there. But I cannot locate anything. Can anyone help me?
Thanks
Avatar of vbDoc
vbDoc

'not responding' would mean that some other process is running and your program is waiting for that to finish. I would look at the processes that you do within your program. Might want to break down that number crunching into smaller chunks.
HTH
ASKER CERTIFIED SOLUTION
Avatar of Bahnass
Bahnass
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Calling DoEvents passes control to the operating system to allow processing of events in the event queue and all SendKey operations. Control is returned to your process after the operating system has finished processing the events and SendKey operations.

DoEvents is most useful for simple things like allowing a user to cancel a process after it has started, for example a search for a file. For long-running processes, yielding the processor is better accomplished by using a Timer, calling GetInputState or delegating the task to an ActiveX EXE component.. In the latter case, the task can continue completely independent of your application, and the operating system takes case of multitasking and time slicing.

Caution - Any time you temporarily yield the processor within an event procedure, make sure the procedure is not executed again from a different part of your code before the first call returns; this could cause unpredictable results. In addition, do not use DoEvents if other applications could possibly interact with your procedure in unforeseen ways during the time you have yielded control.

In other words; use the option of delegating the task to an ActiveX EXE Component.

Grtz.©

D.
Lance:

Are you having this problem with Excel by any chance?

I just submitted a question describing a similar problem.

Avatar of Richie_Simonetti
vbDoc has a clue really.
That 'not responding' isn't always true.
I have it all the time with Access when run queries against a database that are huge, but after a while, Access returns with the results.
Avatar of lance_keen

ASKER

I appreciate the other responses, wish there was a way to spread the points among contributors.
Thanks 4 Points
:-)
my vb application show not responding when it is closed