?
Solved

not responding

Posted on 2002-05-30
8
Medium Priority
?
414 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 800 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

764 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