Microsoft KB Archive/193416

= PRB: Cannot Set the ReadOnly Property of a File =

Article ID: 193416

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q193416



SYMPTOMS
Attempting to set the ReadOnly property of a file results in the following error:

OLE IDispatch exception code 533 from Visual FoxPro for Windows: This property is read-only.



CAUSE
Visual FoxPro does not allow the ReadOnly property of a file to be modified through the FILE object of a project object.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
Run the following code in a program file: STRTOFILE("*test", "mytest.prg") CREATE PROJ test NOSHOW NOWAIT oproj=_VFP.ACTIVEPROJECT oproj.FILES.ADD("mytest.prg") ?oproj.FILES[1].READONLY oproj.FILES[1].READONLY=.T.

