Solved

setting up the environment

Posted on 1997-06-30
3
447 Views
Last Modified: 2013-12-03
How do I set the colors in a simple PC application I'm writing
in FoxPro?  In my driver program, I have included
a copy of the FoxPro resource file (renamed rmeal.dbf), then I
created a color set named menu with 24 schemes (using CREATE
COLOR SET and SET COLOR SCHEME TO), and used SET COLOR SET TO
to activate the colors.  When I run the application from
distribution disks I created with the FoxPro Distribution
Kit, I get the following three error messages:

Cannot open file
File is read only
COLORSET resource is not found

I can click "ignore" to get past them, and the screens will
run.
(I made everything red so I can be sure the program is
using the schemes in my driver program). The first screen is
called wtitle.

What might be wrong with my code?

Here is the code for the start program:

SET RESOURCE TO rmeal.dbf
CREATE COLOR SET menu
SET COLOR OF SCHEME 1 TO RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0)
SET COLOR OF SCHEME 2 TO RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0)

...

SET COLOR OF SCHEME 24 TO RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0), RGB(0,0,0,255,0,0),
RGB(0,0,0,255,0,0)

SET COLOR SET TO menu

SET SYSMENU OFF

DO wtitle



Thanks, M
0
Comment
Question by:miredo
  • 2
3 Comments
 

Author Comment

by:miredo
ID: 1399627
Edited text of question
0
 

Author Comment

by:miredo
ID: 1399628
Edited text of question
0
 
LVL 3

Accepted Solution

by:
vinniew earned 50 total points
ID: 1399629
Two things,

1. The scripting engine in FoxPro is bailing out because a file that holds current scheme is read-only.  You need to check the permissions on that file.

2. Is this on NT or 95?  You'll need to run this with admin privileges in NT.

3. If you have no clue which file is read-only, try changing color schemes, finding out which file was changed, and check that file.

4. Is COLOR SET supposed to be one word or two?



0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now