PRB: Compile-Time Error Occurs Instead of Run-Time Error (129930)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q129930 SYMPTOMS
Setting a read-only property gives you a compile-time error instead of a
run-time error. This behavior represents a new feature in Visual Basic
version 4.0.
CAUSE
Visual Basic version 4.0 checks to see if read-only properties are being
written to at compile time. That is why Visual Basic version 4.0 checks for
this type of error when you select Make EXE File from the file menu, as
opposed to just reporting the error at run time.
This also occurs when Running the program in the Design Environment (with
Compile On Demand turned off). By using this new feature, the compiler
prevents accidental writes to read-only properties. Having the compiler
catch this type of error also stops the error from crashing a program
during run time.
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | kbprb KB129930 |
---|
|