我在程序处理数据时调用窗体的Refresh方法,刷新窗体上的信息,窗体怎么不停地闪?请问如何处理?refresh和update有何区别?

解决方案 »

  1.   

    Application.ProcessMessage ;//就可以了,调用窗体的Refresh方法
      

  2.   

    Call Update to force the control to be repainted before any more, possibly time-consuming, processing takes place. Use Update to provide immediate feedback to the user that cannot wait for the Windows paint message to arrive. Update does not invalidate the control, but simply forces a repaint of any regions that have already been invalidated. Call Repaint instead if you need to invalidate the control as well.Update calls the Windows API UpdateWindow function, which processes any pending paint messages. For more information, see the Win32 Developer's Reference (WIN32.HLP).procedure Refresh;DescriptionCall Refresh method to repaint the control immediately. Refresh calls the Repaint method. Use the Refresh and Repaint methods interchangeably.