Board index » delphi » Simple Question needs a Simple Answer

Simple Question needs a Simple Answer

I am quite new to all this - I have written a very simple procedure which, in a
nutshell is as follows:-

            AsignFile
            OpenFile
Repeat
           Read Record from File
           Display Record
           Show   <-----------------------------------------This is my problem
area, see below
Until EoF
          CloseFile

At the Show point I want to be able to decide what to do, eg Exit, Display Next
Record etc.   If I use show it reads to the end of the file and returns to
where the procedure was called from. If I use ShowModal the screen flashes
eachtime I display a new record - how do I stop this please

Bill Bonnet (WBon...@AOL.com)

 

Re:Simple Question needs a Simple Answer


Try the following:

AssignFile
OpenFile
Read first Record
ShowModal
Repeat
        Read next Record
        Update Modal Window  <--- Thats the point
until EOF
Destroy Modal Window

In the Update-Routine you only fresh up the displayed data. The Window
itself will not be closed meanwhile. I think this will fix your problem.

Greets,

Olaf

WBonnet <wbon...@aol.com> schrieb im Beitrag
<19980101170800.MAA20...@ladder01.news.aol.com>...

Quote
> I am quite new to all this - I have written a very simple procedure
which, in a
> nutshell is as follows:-

>             AsignFile
>             OpenFile
> Repeat
>            Read Record from File
>            Display Record
>            Show   <-----------------------------------------This is my
problem
> area, see below
> Until EoF
>           CloseFile

> At the Show point I want to be able to decide what to do, eg Exit,
Display Next
> Record etc.   If I use show it reads to the end of the file and returns
to
> where the procedure was called from. If I use ShowModal the screen
flashes
> eachtime I display a new record - how do I stop this please

> Bill Bonnet (WBon...@AOL.com)

Other Threads