PRB: TypeOf Operator Does Not Recognize Form Object (194570)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q194570 SYMPTOMS
You are passing an object to an ActiveX component, and attempting to use
the TypeOf operator to determine if the passed object is a form. TypeOf
returns False, even if the object is a form.
RESOLUTION
Do not pass or return forms, controls, or other private objects as method
arguments of an ActiveX component or control. Such objects are not intended
for use in this manner, even though such operations may have succeeded in
previous versions of Visual Basic. See the REFERENCES section below for
more information.
STATUS
This behavior is by design.
REFERENCES
For more information, query on the topic "On the Evils of Returning Private
Objects" in Visual Basic 5.0 Books Online or Visual Basic 6.0 Online Help.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbprb KB194570 |
---|
|