Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to chang _screen properties in config file

Status
Not open for further replies.

longda

Programmer
Jul 24, 2001
66
US
I am having a problem changing some of the VFP _screen properties in the config.fpw file. Currently I have an EXE that will run the newest version of an my APP. I have the same config file included in my projects for both the EXE and the APP. The config.fpw looks like this:

ESCAPE = OFF
RESOURCE = OFF
HELP = OFF
SCREEN = OFF

I then make the screen visible when the main program of the APP runs. I wanted the _screen.borderstyle set at 2, so I added this line at the end of the config file:

_SCREEN.BORDERSTYLE = 2

This is suppose to make the _screen a fixed dialog borderstyle. It does not work, I can still resize the _screen border. I know I can just add the code to main program in the APP, but I wanted to use one config file for all similar apps to use.

If anyone knows why this might be happening please let me know. According to help this line should work.

Thanks
Dave L.
 

_SCREEN.BORDERSTYLE = 2

Try adding the line in your main program instead, since the _screen does not exist yet when VFP reads the config.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I wanted in the config file so that I wouldn't have to change the other main programs in the APPs I already have so all I would have to do is change one config file. In help it says that I can set system variables in the config. In fact their exact example is:

_SCREEN.Caption = "My Application"

So why would not work for the borderstyle. I thought that the config only set defaults. So when the screen does come up it would change the default to the value stored in the config file.

If I am wrong please explain so I will understand more clearly.

Dave L.
 
longda

Based on my experience:
_SCREEN.Caption = "My Application"

Will not work but rather:
TITLE = My Application

Look at the "Special Terms for Configuration Files" in the help file. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks for your help Mike. I guess I will have to put the borderstyle code in my APP's main program. No big deal but I thought it would be easier to do it the other way.

Thanks again
Dave L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top