Apply dark theme in visual foxpro editor and also in Notepad++
The editor will look very similar to the microsoft visual studio dark theme.
Requires Visual FoxPro 9 with SP2.
Requires Visual FoxPro 9 with SP2.
Colors used in the fonts:
FOXPRO LOOK
*| AUTOCOM3 TECNOLOGIA E SOFTWARES LTDA (c) 2018 Todos os direitos reservados.
*|
*| Data da última revisão deste codigo: 02/10/2019 11:05:49 AM
SET PATH TO HOME() + "FFC\" ADDITIVE
#include "Registry.H"
CLEAR
setdarkthemeeditorcolors()
MESSAGEBOX([Volte a abrir o visual fox para aplicar o tema.];
, 4096 + 64;
, [DarkTheme for Microsoft Visual FoxPro])
FUNCTION setdarkthemeeditorcolors()
LOCAL lnloop AS INTEGER;
, lcregkey AS STRING;
, lcvalue AS STRING;
, regconst AS STRING
DIMENSION aeditorcolors[7, 3]
aeditorcolors[1, 1] = "EditorCommentColor"
aeditorcolors[1, 2] = "RGB(87,166,74,30,30,30), NoAuto, NoAuto"
aeditorcolors[2, 1] = "EditorKeywordColor"
aeditorcolors[2, 2] = "RGB(57,135,214,30,30,30), NoAuto, NoAuto"
aeditorcolors[3, 1] = "EditorConstantColor"
aeditorcolors[3, 2] = "RGB(177,130,177,30,30,30), NoAuto, NoAuto"
aeditorcolors[4, 1] = "EditorNormalColor"
aeditorcolors[4, 2] = "RGB(0,255,0,30,30,30), NoAuto, NoAuto"
aeditorcolors[5, 1] = "EditorOperatorColor"
aeditorcolors[5, 2] = "RGB(220,220,220,30,30,30), NoAuto, NoAuto"
aeditorcolors[6, 1] = "EditorStringColor"
aeditorcolors[6, 2] = "RGB(214,136,82,30,30,30), NoAuto, NoAuto"
aeditorcolors[7, 1] = "EditorVariableColor"
aeditorcolors[7, 2] = "RGB(127,216,170,30,30,30), NoAuto, NoAuto"
lcregkey = "Software\Microsoft\VisualFoxPro\9.0\Options"
regconst = HKEY_CURRENT_USER
FOR lnloop = 1 TO ALEN(aeditorcolors, 1)
lcvalue = setregkey(regconst, lcregkey, aeditorcolors[lnLoop, 1], aeditorcolors[lnLoop, 2])
ENDFOR
*
ENDFUNC
FUNCTION setregkey()
LPARAMETERS hkey AS CHARACTER, keypath AS CHARACTER, entry AS CHARACTER, regvalue AS CHARACTER
getregistryapi()
keypath = ADDBS(TRANSFORM(EVL(keypath, "")))
entry = TRANSFORM(EVL(entry, ""))
regvalue = TRANSFORM(regvalue)
RETURN (oregapi.setregkey(entry, regvalue, keypath, hkey, .T.) = 0)
FUNCTION getregistryapi() AS registry
IF VARTYPE(oregapi) # "O"
PUBLIC oregapi AS registry
oregapi = NEWOBJECT("Registry",;
HOME() + "FFC\Registry.VCX")
ENDIF
RETURN oregapi
ENDFUNC
Comments
Post a Comment