How can I make my form resize more smoothly?

后端 未结 5 1698
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-31 18:57

When resizing a form with many controls, the form looks bad because of flickering. What are some tips to have a smoother form resizing?

5条回答
  •  孤街浪徒
    2021-01-31 19:58

    I've got around this as follows:

    1. In the 'OnResize' event of the form, have a routine to hide all child controls and then start a timer with a tick of about 500ms.
    2. When the timer fires, disable it and then set all child controls to visible.

    By playing around with this activity you get a form that goes blank whilst you are sizing it, but then populates itself neatly when you 'let go'.

    Bri

提交回复
热议问题