advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EVENT Statement Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 EVENT {ON | OFF}
 
 Usage Notes
   ■ The EVENT statement does not affect form- or control-specific events.
     Forms and controls use different event handlers. Use object-specific
     events with forms. See: Object Events Summary
 
   ■ If your program contains event-handling statements and you are compiling
     from the BC command line, use the /W or /V option. If you do not use
     these options and your program contains event traps, Visual Basic
     generates the error message, "ON event without /V or /W on command
     line." See: BC Command-Line Options
 
   ■ The EVENT statement affects compiled code generation. With EVENT OFF,
     the compiler will not generate any event-checking code.
 
   ■ The effect of the EVENT statement is always global.
 
   ■ EVENT ON and EVENT OFF can be used to bracket sections of code where
     events do not need to be detected and trapped, and fast performance is
     required.
 
   ■ If a trapped event occurs while EVENT OFF is in effect, that event is
     remembered and handled if and when an EVENT ON block is entered.