Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ProgramFont Registry Key Value
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00800683
Message ID:
00802677
Views:
29
Hi Sergey,

Thanks for that information. I thought I'd also tried the 'Program" Value Name but will give it another try. I'd missed that in the foxuser.dbf as well.

Thanks again for your time and help,
Clay

>Hi Clay,
>
>You're on the right track with the font for code editing window. The changes you're doing will only have effect on code editing window for new programs. To make it work for all programs, go to Tools-> Options-> IDE and check Overide individual settings for PRG;MPR;QPR;SPR. BTW, that value and some other from that screen is stored in the Value Name 'Program' under the same registry key.
>
>Command Window font is stored in VFP resource file foxuser.dbf inder Id='WINDCMD' in the Data field. The structure of that field isn't published. As workaround, you can created records with settings you want, store them in the table and than INSERT/UPDATE records in foxuser dbf when you need.
>
>>I'd like to programmatically change the font (name, size, style) used for VFP's command window and code editing window...
>>
>>I've found a few references to "ProgramFont" both here:
>>
>>HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\8.0\Options\ProgramFont
>>
>>and here in the Windows Registry...
>>
>>HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\8.0\Options\IDE\ProgramFont
>>
>>Using the following code I can successfully edit these key values but see no result within VFP, even after restarting VFP:
>>
>>#DEFINE HKEY_CURRENT_USER   -2147483647 && BITSET(0,31)+1
>>#DEFINE ERROR_SUCCESS		0			&& OK
>>
>>
>>* - Create FoxReg object for Registry reading/writing
>>regfile = HOME(2)+[classes\registry.prg]
>>SET PROCEDURE TO (m.regfile) ADDITIVE
>>ThisForm.oReg = CreateObject([FoxReg])
>>* -
>>
>>WITH ThisForm
>>  .oReg.SetFoxOption([ProgramFont],.cProgramFont)
>>
>>  * - Also tried SetRegKey so I can specify the \IDE key, same result	
>>  * - .oReg.SetRegKey([ProgramFont],.cProgramFont,;
>>  * -   [Software\Microsoft\VisualFoxPro\] + .cVFPVersion + [\Options\IDE],;
>>  * -  HKEY_CURRENT_USER)	
>>ENDWITH
>>
>>* - This simply causes VFP to refresh its Registry information
>>SYS(3056)   && SYS(3056,1) has same effect
>>
>>
>>Any idea as to what I'm missing here? It's odd because I can confirm that the key values are, in fact, being written to the Registry...yet no reflection of this change in VFP itself. I also have looked through FOXUSER.DBF but found no reference to fonts.
>>
>>Thanks,
>>Clay
--------------------------
Clay Angelly
cangelly@ie-inc.com
Never argue with an idiot. They drag you down to their level and beat you with experience.
Previous
Reply
Map
View

Click here to load this message in the networking platform