ID Number: Q80403
1.00
WINDOWS
docerr
Summary:
The Visual Basic Control Development Kit (CDK) API function
VBSetErrorMessage only operates correctly when called in response to a
"VBM_" message, such as VBM_SETPROPERTY.
This information applies to the Microsoft Visual Basic Control
Development Kit (CDK) for Microsoft Visual Basic Programming system
version 1.0 for Windows. The Visual Basic CDK is shipped as part of
Microsoft Professional Toolkit for Microsoft Visual Basic version 1.0
for Windows.
More Information:
The VBSetErrorMessage routine can be called from a custom control in
response to a VBM_ message to pass an error number and message back to
Visual Basic. When execution returns to Visual Basic, a trappable
run-time error will occur, with the error number and message specified
in the call to VBSetErrorMessage.
The VBSetErrorMessage routine works only in response to messages that
originate from Visual Basic itself (VBM_ messages). Visual Basic
responds to the return code for VBM_ messages, and in turn sets the
error condition in the program. If the return code for a VBM_ message
is True, Visual Basic will generate an error condition. For other
messages (non VBM_ messages), Visual Basic must pass along the return
code to the originator of the message (usually Windows); therefore,
Visual Basic will not generate an error condition for these messages.
Reference(s):
"Microsoft Visual Basic: Control Development Guide," Ó 1992, page
117 (shipped with Professional Toolkit)
"Microsoft Visual Basic: Control Development Guide," Ó 1991, page
108 (part no. 20666)
Additional reference words: 1.00