Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lockscreen does not lock
Message
De
14/08/2008 09:10:12
 
 
À
14/08/2008 05:10:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Divers
Thread ID:
01338795
Message ID:
01338854
Vues:
42
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform