*---------------------- Location Section ------------------------ * Library: Aforms.vcx * Class: Dataentryform * Method: Reallylockscreen() *----------------------- Usage Section -------------------------- *) Description: Use the Windows API to force a true screen lock. * ...........: Calling this lock function with a handle of 0 unlocks all locked windows *) * Scope: Public * Parameters: *$ Usage: *$ * Returns: *--------------------- Maintenance Section ---------------------- * Change Log: * CREATED 06/03/2005 - Marcia Akins * MODIFIED *---------------------------------------------------------------- lparameters tlLock local array laJunk[1] local lnHWnd, lnRes ********************************************************** *** Check that the library has been set up and open it if not already done. ********************************************************** lnRes = adlls( laJunk ) if m.lnRes = 0 or not ( ascan( laJunk, 'LockWindowUpdate', 1, -1, 1, 15 ) > 0) *** We don't have the function available declare integer LockWindowUpdate in Win32API integer nHandle endif *** Now set the Handle to lock according to the parameter lnHWnd = iif( m.tlLock, thisform.hwnd, 0 ) *** And call the function LockWindowUpdate( m.lnHWnd ) return>I have a form with a pageframe. One one of the pages are about 200 verticle lines which are used to represent a bar graph. The height of the line is adjusted based on code in the line's refresh event. SInce it takes a moment to perform these calcs, I wanted to turn off the screen at the beginning of the refresh for the first line and turn it back on after the last line has been refreshed. To simplify things I wanted to adjust the order at which the lines are refreshed (height adjusted).