notesUIWorkspace.RepaintScreen()
Glen Urban March 11 2010 03:21:34 PM
Ever wished you had a method to repaint the screen?Recently I was working on some automation with Microsoft Word and wanted to display a message to the user warning them that the processing may take a while. I used a hide-when formula to display a message on my form but I found that the screen did not repaint correctly. Some controls on the form that should have been hidden were still displayed.
As far as I know there is no way in LotusScript to repaint the screen. To resolve this we can make a call to Windows to do the refresh for us.
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Integer
Declare Function UpdateWindow Lib "user32" (Byval hWnd As Integer) As Integer
Sub RepaintScreen
On Error Resume Next
Call UpdateWindow(GetActiveWindow())
End Sub
- Comments [0]
