|
Question : Resize forms using the ADHresize2k gives form FLICKER
|
|
I tried using the ADHresize2k (Acess2000 developers Handbook by Getz Liwin 1999) as suggested in a preivous resize fix on the access forum to solve the multiple screen resolution issue.
One of my forms has a tabbed subform and when loading it has a lot of flickering
other forms in the backgroud flash up and there is more flickering and resizing
The form eventually does what I want it to but getting there is ugly
is there a way to stop the flicker or hide the form until its loaded?
|
|
Answer : Resize forms using the ADHresize2k gives form FLICKER
|
|
Try turning off screen update using the LockWindowUpdate API. Add the code below to a Standard Module, then use it like this:
LockWindow Me.hwnd
UnlockWindow
This will help, but nothing will stop the screen flickering, you'll always get a bit of it.
'/put this in the General Declarations section of a standard Module Declare Function LockWindowUpdate Lib "user32" (ByVal hwnd As Long) As Long
'/add the 2 subs below to the same module Public Sub LockWindow(hwnd As Long) '/Purpose: '/Created: 11/24/2004 08:02 AM '/Created By: Scott
On Error GoTo Err_LockWindow LockWindowUpdate hwnd
Exit_LockWindow: On Error Resume Next Exit Sub
Err_LockWindow: Select Case Err 'case Case Else MsgBox Err & ":" & Error$, vbCritical, "basRoutines" & ": " & "LockWindow" End Select Resume Exit_LockWindow End Sub
Public Sub UnlockWindow() '/Purpose: '/Created: 11/24/2004 08:02 AM '/Created By: Scott
On Error GoTo Err_UnlockWindow On Error Resume Next LockWindowUpdate 0
Exit_UnlockWindow: On Error Resume Next Exit Sub
Err_UnlockWindow: Select Case Err 'case Case Else MsgBox Err & ":" & Error$, vbCritical, "basRoutines" & ": " & "UnlockWindow" End Select Resume Exit_UnlockWindow End Sub
|
|
|
|