Remedy for Form Flicker


Author
Message
Brad Vick
Brad Vick
StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)
Group: Forum Members
Posts: 33, Visits: 88




I have spent quit a bit of time searching for a remedy for our form flickering issue. On some of our busy forms (80-100 controls) when the form is drawing you can see the individual controls being drawn, which causes the form to flicker. What I want to happen is basically draw the form invisibly, then once all the forms are drawn show the entire form. I have attempted the doublebuffer solution but it has not helped the situation.



Has anyone else experienced this 'flicker'? If so how did you remedy it?
Replies
Ross L Rooker, Sr.
Ross L Rooker, Sr.
StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)
Group: Forum Members
Posts: 2, Visits: 3
Unfortunately it is not just when a form loads. After my form is loaded, clicking on any tab, then back repeatedly, shows the ghost image of the tab clicked from while drawing the control on the page tab clicked to. If it was just on the page load it wouldn't be as bad. My thought would be a lock to the windows 32 desktop on the activation of the page tab and then unlocking after the tab is rendered. Is there any example of the win32 api code required to handle this and what event it should be located in?
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
We actually added this API call to the SF tools namespace.  It will be included in the 1.6.2 build or you could just manually call the API.

Using SF

MicroFour.StrataFrame.Tools.LockScreen.Lock(Me)
MicroFour.StrataFrame.Tools.LockScreen.Unlock()

Using WinAPI Directly (All the SF method does)

<DllImport("user32.dll")> _
Private Shared Function LockWindowUpdate(ByVal hWndLock As IntPtr) As Boolean
End Function

'-- Lock the window
LockWindowUpdate(Me.Handle)

'-- Unlock the Window
LockWindowUpdate(Intptr.Zero)



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search