Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lockscreen does not lock
Message
From
14/08/2008 09:10:12
 
 
To
14/08/2008 05:10:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Miscellaneous
Thread ID:
01338795
Message ID:
01338854
Views:
41
This message has been marked as a message which has helped to the initial question of the thread.
When activating a new page, on this page a container with ActiveX - Internet Explorer the Explorer box is showing before the old page is completely gone. Even Lockscreen = .t. does not give the desired effect.

That is because LockScreen only effects Visual FoxPro controls and ActiveX controls are true Windows Controls so you need to use the Windows API to handle this. What I did was add a method called ReallyLockScreen to my base form class and call it with the same parameters that I would use to set the native VFP LockScreen property:
***********************************************************************
* Program....: REALLYLOCKSCREEN
* Date.......: 22 December 2002
* Purpose....: Use the Windows API to force a true screen lock. 
* ...........: Calling this lock function with a handle of 0 unlocks all locked windows
***********************************************************************
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 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( tlLock, ThisForm.HWnd, 0 )
*** And call the function
LockWindowUpdate( lnHWnd )

RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform