I can think of 2 ways of doing it, The first way is much easier and faster and works a lot better that I anticipated, so use that.
you need these APIs
Code:
Private Declare Function UpdateWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
and just call it with
Code:
Call UpdateWindow(GetDesktopWindow)
this refreshes the desktop window, which basicly means the screen
Just in case you're interested the secons uses EnumWindows to Get a handle to every window on the screen and refreshes them all individually
Put this in a standard module
Code:
Private Declare Function UpdateWindow Lib "user32" (ByVal hWnd As Long) As Long
Public Sub RefreshScreen()
Call EnumWindows(AddressOf EnumProc, 0)
End Sub
Public Function EnumProc(ByVal hWnd As Long, ByVal lParam As Long) As Long
Call UpdateWindow(hWnd)
EnumProc = 1
End Function
Then use RefreshScreen to refresh the whole screen.
Use the first one.