PRB: No ON Event GOSUB Processing with Modal Form Showing
PSS ID Number: 100067
Article Last Modified on 1/8/2003
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS 1.0
This article was previously published under Q100067
SYMPTOMS
Event handlers for the ON ... GOSUB statements do not occur while a
modal form or MSGBOX is showing. However, event processing does occur
as you move the mouse cursor over the modal form or if you press a key.
CAUSE
This behavior is by design; it is not a bug. The ON ... GOSUB statements
do not function while a Basic statement is executing. This includes the
MSGBOX statement as well as form.SHOW 1. Events processing occurs when
you move the mouse or press a key because this causes user statements to
execute (for example, KeyPress and MouseMove).
WORKAROUND
- Show all forms non-modally. Instead of using MSGBOX, display a non-modal
form to display messages.
- Instead of ON COM GOSUB, use a timer control on a form that checks LOC
to see if characters are waiting.
STATUS
This behavior is by design.
Additional query words: VBmsdos 1.00
Keywords: kbprb KB100067
Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3