Form Redraw Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have built a form with 2 Radio Buttons on it for basic and advanced
configuration options. When the Basic option is selected I hide and
reposition controls and visa versa for adavnced. Technically I am notmoving
the controls, I am using a C!Sizer control and resizing the rows. The issue
is that when the code executes you see the controls a flash where the
controls are being redrawn. I tried using suspendlayout and resumelayout but
that doesn't have much effect.

Is there a way to stop this visual effect from happening?
 
Never mind I ffound what I was looking for...but for anyone else intersested
in the answer.

Public Declare Function LockWindowUpdate Lib _
"user32.dll" (ByVal hwnd As Long) As Long

Then wrap the update code in...

LockWindowUpdate(Window.Handle.ToInt32)
--Your Code
LockWindowUpdate(0&)
 
Back
Top