Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Color background textboxes, how to avoid flash of white
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01145897
Message ID:
01145967
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>I have textboxes, editboxes which have a shade of green as it's backgound color. When the form starts the controls does show up white for once and then it functions properly. How can I avoid this. I am using CodeBook as the framework, so I have modified the i-Layer but not the c-Layer.
>
>Please advise.

Hard to really say what is the problem, but you may try to lock screen (using API function) in form's Load and unlock in form's activate.

Here is a code by Marcia Akins that I added to our form class:
*---------------------- 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
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform