Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

setting up the environment

Posted on 1997-06-30
3
Medium Priority
?
493 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 200 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

604 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