Form Redraw Issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Waskiewicz

    #1

    Form Redraw Issue

    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?
  • Jeff Waskiewicz

    #2
    RE: Form Redraw Issue

    BTW - I am using VB.NET 2003

    "Jeff Waskiewicz" wrote:
    [color=blue]
    > 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?[/color]

    Comment

    • Jeff Waskiewicz

      #3
      RE: Form Redraw Issue

      Never mind I ffound what I was looking for...but for anyone else intersested
      in the answer.

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

      Then wrap the update code in...

      LockWindowUpdat e(Window.Handle .ToInt32)
      --Your Code
      LockWindowUpdat e(0&)

      "Jeff Waskiewicz" wrote:
      [color=blue]
      > 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?[/color]

      Comment

      Working...