Answered by:
Color Schemes

Question
-
I just upgraded to visual Foxpro 7. I need to know how to change colors of some text and data entry pointsSunday, November 17, 2013 9:26 PM
Answers
-
Frank, is this what you need?
- Edited by Pavel Celba Tuesday, November 19, 2013 8:47 PM name change
- Marked as answer by Hydrant60 Wednesday, November 20, 2013 12:42 PM
Tuesday, November 19, 2013 8:44 PM
All replies
-
Hope you are not using @SAY/GET commands in Visual FoxPro. From which FoxPro version did you upgrade to VFP7?
Visual FoxPro 7 uses ForeColor and BackColor property on almost all visual controls and you may select the color in Form designer or simply write a line of code:
THISFORM.Text1.ForeColor = RGB(255,0,0) && Red foreground color - equivalent to COLOR R+
Some controls can inherit colors from Windows Themes and you cannot change them when Form.Themes property is set to .T. (this is also valid for @ ... SAY/GET).
BTW, why didn't you upgrade to VFP 9? Its SP2 is the latest and the most stable version.
I would also recommend this book: http://www.hentzenwerke.com/catalog/hackfox7.htm (and many others from Hentzenwerke).
Sunday, November 17, 2013 10:44 PM -
Hi Pavel
The problem I have is I moved from Visual FoxPro 5 to Visual FoxPro 7 which went fine. In version 5 you could change colors with the statement Set Color to gr+/w,w+/b but that doesn't work in version 7. I have read the help files but still can't figure it out. Your help will be greatly appreciated.
Frank
- Proposed as answer by Koen-P Monday, November 18, 2013 12:06 PM
Monday, November 18, 2013 12:36 AM -
Hi mr. Hydrant,
Pavel is absolutely correct (of course). Do yourselve a favor and forget about VFP7 instantly. Since you only recently updated to VFP7 you might aswell update now to VFP9SP2 which will secure you to the newest most stable version of Visual FoxPro.
Also get rid of the set color to GR+/W a.s.o. use the more modern way of the color properties which you will find in your object.
The helpfile and the solutions samples can give you excellent guides how to do this. But we are prepared to assist you also with some information.
Regards,
KoenP
Monday, November 18, 2013 12:06 PM -
Hi Koen
I moved up to VFP 7 because it was free from a friend of mine. I'm sure I will be able to get VFP 9 soon if I annoie him for it. In the mean time I'm sort of stuck with what I have. Back to my problem. Changing colors of text and data entry fiels was so much easer with VFP 5. I have read the help files in VFP7 but for some strange reason I can not get changing colors to work. I know I'm missing something someware. Perhaps if you could send me some examples it might make sense to me. It must be an age thing. LOL
Frank
Monday, November 18, 2013 1:01 PM -
Hi Frank,
there are two properties for manipulating object colors.
ForeColor will change the font
Backcolor will change the background
These two props are available for almost every object on your form. However, in case of changing the preset values and seeing no reaction on your form, you might have to set 'Themes=.F.' from within the properties window. This prop is also availlable for each object.Gruss / Best regards
-Tom
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible,
you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011Monday, November 18, 2013 3:08 PMAnswerer -
I wrote it already but I have to extend if probably...
Simply place following command at the beginning of your code:
_screen.Themes = .F.
Monday, November 18, 2013 3:52 PM -
Um, if you mean what I think you mean, your friend can't legally give you VFP 9, unless he has stopped using it and uninstalled it from his computer.
Tamar
Monday, November 18, 2013 9:26 PMAnswerer -
Hi Tamar
Well there is legal and then there is legal, I feel as long as I get original disks I'm Legal. If he doesn't uninstall the software I have no control over that. Either way it is not pirated.
Frank
Tuesday, November 19, 2013 1:25 AM -
Hmmm... Interesting. How do you apply this theory to downloadable software? (Visual FoxPro is not available on discs today.)
OTOH, this discussion is a little bit off-topic here because this forum cannot solve your software legality... I am expecting your software is legal.
Tamar, please could you tell how to legally use software which is not on the market already? (FoxPro 2.x, VFP 5, 6 etc.)
Tuesday, November 19, 2013 8:56 AM -
Hydrant,
You can buy VFP9 at http://microsoft-visual-foxpro.software.informer.com/9.0/ the price is reasonable and the product is wonderfull.Can you afford/live with the fact that you use a stolen copy?
Regards,
KoenP
Tuesday, November 19, 2013 5:20 PM -
Hydrant,
You can buy VFP9 at http://microsoft-visual-foxpro.software.informer.com/9.0/ the price is reasonable and the product is wonderfull.Can you afford/live with the fact that you use a stolen copy?
KoenP could you please point the place where this page offers VFP 9 for sale?
My opinion: software.informer.com is almost useless web resource and I've never found what I need on this page so I am skipping all similar links returned by search engines...
Tuesday, November 19, 2013 8:24 PM -
Frank, is this what you need?
- Edited by Pavel Celba Tuesday, November 19, 2013 8:47 PM name change
- Marked as answer by Hydrant60 Wednesday, November 20, 2013 12:42 PM
Tuesday, November 19, 2013 8:44 PM -
I'll check it out. thanksTuesday, November 19, 2013 10:12 PM
-
Hi Pavel
I tried _screen.forecolor = rgb(0,0,0) and than _screen.backcolor = rgb(0,0,0) that works and that works for most things. I'll try your solution and see if that works.
Thanks
Frank
Tuesday, November 19, 2013 10:19 PM -
Frank,
this is not related to colors at all and I would highly recommend to close this question and creating a new one. It will also be better searchable.
Others can tell more but if the SET CENTURY does not work for you then we have to count it as "by design" feature.
Wednesday, November 20, 2013 12:22 AM