form flicker (1 Viewer)

deadman

Registered User.
Local time
Yesterday, 18:36
Joined
Feb 13, 2002
Messages
23
I have made a form that uses a bitmap image as it's background. I have the image stretched to fit form and embedded as opposed to linked. The form only has 3 command buttons on it and a few text boxes. When the form is opened, it flickers between the image and the detail section background color before finally coming to rest with the form correctly displayed. I didn't have this problem before I decided to get fancy and add the image. I have tried:

DoCmd.Echo False
"Code"
DoCmd.Echo True

as well as:

Application.Echo False
"Code"
Application.Echo True

I used the code on the form open event and the form load event with no success. Everything is working fine as far as the database is concerned...the flickering just makes the application look unstable and may scare some potential users away. I am using Access 2000. Any suggestions?

[This message has been edited by deadman (edited 05-13-2002).]
 

llkhoutx

Registered User.
Local time
Yesterday, 18:36
Joined
Feb 26, 2001
Messages
4,018
Here's some code, ccourtesy of the Access Cookbook, published by O'Reilly:

Call acbshowUpdates(False)
your code here
Call acbshowUpdates(True)

Add the following call to windows API LockWindowUpdate into a module:

Option Compare Database
Option Explicit

Declare Function acb_apiLockWindowUpdate Lib "user32" _
Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long

Sub acbShowUpdates(fShow As Boolean)
If fShow Then
acb_apiLockWindowUpdate 0
Else
acb_apiLockWindowUpdate Application.hWndAccessApp
End If
End Sub
 

Users who are viewing this thread

Top Bottom