Solved

setting up the environment

Posted on 1997-06-30
3
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need example 5 137
Problem to packaging 1 127
Post a good COM tutorial 1 72
Developing a front end to SPLUNK 1 104
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

732 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