Solved

How to stop dbgrid to redraw while loading data

Posted on 1998-04-10
3
209 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

770 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