General information
Category:
Windows API functions
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...
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only