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&)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top