Solved

How to stop dbgrid to redraw while loading data

Posted on 1998-04-10
3
210 Views
Last Modified: 2012-05-04
In my application I load about 1000 records in a table which is connected to a DBGrid. How can I control the redrawing of the DBGrid during the load process? I would like to stop the redraw temporarily to speed things up.
0
Comment
Question by:hansbos
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 100 total points
ID: 1460905
Use the LockWindowUpdate API:
Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long

'Lock:
LockWindowupdate db1.hwnd

'unlock
LockWindowUpdate 0
0
 

Author Comment

by:hansbos
ID: 1460906
Thanks. It works perfectly.
0
 

Author Comment

by:hansbos
ID: 1460907
Thanks. It works perfectly.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

830 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