Solved

not responding

Posted on 2002-05-30
8
398 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:lance_keen
8 Comments
 
LVL 2

Expert Comment

by:vbDoc
ID: 7044557
'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
0
 
LVL 3

Accepted Solution

by:
Bahnass earned 200 total points
ID: 7044670
also I think U can use    DoEvents Statement inside 'Critical loops' taking a lot of time

This returns control to user

With special care that this may be a problem it self if u use it much especially whan a control get or lost focus !!
0
 
LVL 3

Expert Comment

by:daffyduck14mil
ID: 7044701
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.
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 

Expert Comment

by:JimmieToo
ID: 7045176
Lance:

Are you having this problem with Excel by any chance?

I just submitted a question describing a similar problem.

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7048305
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.
0
 

Author Comment

by:lance_keen
ID: 7051207
I appreciate the other responses, wish there was a way to spread the points among contributors.
0
 
LVL 3

Expert Comment

by:Bahnass
ID: 7054251
Thanks 4 Points
:-)
0
 

Expert Comment

by:rahul_devpuri
ID: 8915710
my vb application show not responding when it is closed
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question