Solved

setting up the environment

Posted on 1997-06-30
3
457 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to have excel show file name on the title bar 4 50
SQL to ElasticSearch Query 1 644
WPF issue with Trigger 2 108
C# LINQ ForEach() question 6 28
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

822 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