Private Sub Form_Load()
' 拦截WINDOWS消息
lpPrevWndProc = SetWindowLong(.hWnd, GWL_WNDPROC, AddressOf WindowProc)
End Sub
'屏蔽掉MSChart窗体的删除背景消息,就不会出现白色闪烁现象了.
Public Function WindowProc(ByVal hWnd As Long, ByVal uMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
If uMsg <> WM_ERASEBKGND Then WindowProc = CallWindowProc(lpPrevWndProc, hWnd, uMsg, wParam, lParam) Else WindowProc = 0
End Function
同时把DoSetCursor 属性设置为FALSE,可以防止光标闪烁
该方法在MSChart20Lib中通过