How do you prevent a RichTextBox from refreshing its display?

前端 未结 6 1291
再見小時候
再見小時候 2020-11-30 09:10

I have a RichTextBox where I need to update the Text property frequently, but when I do so the RichTextBox \"blinks\" annoyingly as it refreshes all throughout a method call

6条回答
  •  情歌与酒
    2020-11-30 09:52

    I would suggest looking at LockWindowUpdate

    
    [DllImport("user32.dll", EntryPoint="LockWindowUpdate", SetLastError=true,
    ExactSpelling=true, CharSet=CharSet.Auto,
    CallingConvention=CallingConvention.StdCall)]
    

提交回复
热议问题