: On Tue, 19 Nov 1996 01:55:29 GMT, Com...@lottery.powernet.co.uk
: >Is there a function that says "are there messages pending"? By
: >messages I mean mouse clicks not yet processed or keystokes waiting in
: >the keyboard buffer.
: >
: >This is why I ask. It would be useful here:
: >
: >On scrolling a table, a look-up in OnDataChange() slows down the
: >display. This is an issue if the user keeps clicking repeatedly on the
: >scroll bar.
: >
: >In other words, the lookup function is very much "in a hurry" to try
: >and catch up. This means the entire DBGrid drags along and feels
: >boringly slow.
: >
: >If there was a function which could test whether there are "scroll
: >clicks" or any keystrokes or clicks not yet processed or pending, then
: >the lookup function could be called at the end only. This occurs when
: >the user releases the mouse and there are no more clicks pending.
: >
: >The scrolling display would become lightning fast, despite a complex
: >lookup link to other tables.
: >
Another reader directed you toward PeekMessage, which is probably
the way to go. However, you might also make sure you are using
the Scrollbar's "Change" event instead of "Click" event. Change
only gets called at the end (when user releases mouse and the value
actually is changed).
procedure MyForm.ScrollBarTimeChange(Sender: TObject);
begin
UpdateTableLookup();
end;
--
------------------------
-- David Kirkpatrick --
-- Southwest Software --
-- dav...@csn.org --