Solved

not responding

Posted on 2002-05-30
8
371 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
 

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now