Solved

not responding

Posted on 2002-05-30
8
407 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 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
Independent Software Vendors: 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

738 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