PRB: "Invalid Property Value" When You Query MDIChild Property (190220)
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 Q190220 SYMPTOMS
In Visual Basic, if you query for the MDIChild property of an MDI Parent
form, the following error occurs:
Error 380 : Invalid Property Value
CAUSE
MDI Parent forms do not have an MDIChild property. To query for this
nonexistent property will result in the above error.
RESOLUTION
To resolve this, use the following code to query for the MDIChild property
of a form:
Sample Code
Dim f As Form
For Each f In Forms
If Not TypeOf f Is MDIForm Then
If f.MDIChild Then
Form1.Print f.Name & " MDI Child"
Else
Form1.Print f.Name & " Not MDI Child"
End If
Else
Form1.Print f.Name & " Not MDI Child"
End If
Next
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbcode kberrmsg kbprb KB190220 |
---|
|