Information générale
Catégorie:
Fonctions Windows API
Sorry Erik, but it didn't work. Seems assign method means just that, you must assign a value to a property. This is the code I used, perhaps somebody else will do better:
frmColorWatcher = CREATEOBJECT('_frmColorWatcher')
frmColorWatcher.Visible = .T. && To see what was happening
DEFINE Class _frmColorWatcher AS Form
Enabled = .F.
PROCEDURE Backcolor_Assign
LPARAMETERS tnBackcolor
ThisForm.Backcolor = tnBackcolor
DECLARE INTEGER GetSysColor IN win32api INTEGER nIndex
_SCREEN.ForeColor = GetSysColor(4) && Menu background
RETURN
PROCEDURE Forecolor_Assign
LPARAMETERS tnForecolor
ThisForm.Forecolor = tnForecolor
DECLARE INTEGER GetSysColor IN win32api INTEGER nIndex
_SCREEN.BackColor = GetSysColor(2) && Active window caption
ENDIF
RETURN
ENDDEFINE
>>I will use the assign method of an object whose color is determined by the windows selection and refresh from there.
>>
>
>
>Have you gotten this to work? If so, I would like to hear how...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement