ReadOnlyMode Property

       

Returns or sets a value that determines how the Visual Basic development environment interacts with read-only files.

Syntax

object.ReadOnlyMode [= value]

The ReadOnlyMode property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A long integer or constant that determines the project status, as described in Settings.

Settings

The settings for value are:

Value Description
1 Strict. Remove File and Add File commands are not available if the project file is read-only on the disk. Windows and forms can be moved, but changes will not be saved. For files which are also read-only on disk, the Code Window is read-only; controls cannot be added or removed, control positions are locked, and custom Properties dialog boxes are disabled.
0 Lenient. Modifications can be made to code, forms, and the project if files are read-only, but changes can't be saved back to the files.