Re: "Not Responding" when reading and processing large file

From: Vladimir Scherbina (vladimir_ns_at_ukr.net)
Date: 02/06/04


Date: Fri, 6 Feb 2004 15:37:03 +0200

it hungs because the window proc of your appl does not process messages sent
to it.

to fix that create thread which will be reading your large file and make
needed actions.

I advice you to read Richter's "advanced windows" and you will understand
what is "threads"..

--
    Vladimir Scherbina,
     Ukraine, Kiev.
"Jimbo" <None> wrote in message
news:uAx$DTL7DHA.2812@TK2MSFTNGP11.phx.gbl...
> I'm working on a win app that reads and processes each line of an ascii
file
> until the end of the file.  Since the file's 1.6 million lines long, after
a
> while Windows displays the "Not Responding" although the application's
> running fine.  Is it possible to add anything that'll stop Windows from
> displaying that?
>
> Also, how would I be able to always have control of the form in case I
want
> to abort the process? Once it starts running, I lose control of the form.
> I've heard of being able to use threads but I really didn't understand
them.
>
> Thank you.
>
>


Relevant Pages

  • Re: Custom Collection in Property Grid
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... > I have a menu control I am writing, and I have created a "MenuItem" ... > properties of my MenuItem members. ... > I have been reading some about using PropertyDescriptors to tell the ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: file() works in Windows not on Linux
    ... The file I am reading from is not under my control. ... have no problems running this in Windows, but it blows up in Linux. ...
    (php.general)
  • Re: can i create a modalless dialog box in worker thread.
    ... A worker thread does not support any kind of windows. ... messages and worker thread does not process messages. ... A UI thread can support windows but it makes the communication between the ...
    (microsoft.public.vc.mfc)
  • Re: Immer noch: Systembelastung verringern
    ... kann es nicht auf weitere Windowsbotschaften reagieren. ... You have to be careful when using Sleep and code that directly or indirectly creates windows. ... If a thread creates any windows, it must process messages. ...
    (de.comp.lang.delphi.misc)
  • Re: can i create a modalless dialog box in worker thread.
    ... Windows need messages and worker thread does not process messages. ... A UI thread can support windows but it makes the communication between the threads very difficult. ...
    (microsoft.public.vc.mfc)