|
-
Jan 31st, 2000, 01:13 PM
#1
Thread Starter
Member
Hello, I got a problem with MDI forms. When I load the child forms, they all work perfectly fine, but when i try to check for the window w/ same caption before actually load another form, sometimes, it pops up a blank window. Can anyone help me out?
-
Jan 31st, 2000, 05:46 PM
#2
Frenzied Member
When you are 'in' a child form you should always use the Me keyword and not the form name to work with the form's properties;
Eg- if the form is called frmDocument;
Use Me.Caption = "...."
instead of frmDocument.Caption = "..."
If you use the name of the form VB starts a new version of that form.
Lookup ME in the help for more info.
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
-
Feb 1st, 2000, 01:08 AM
#3
How are you checking for the Existence of another Window with the Same Caption?
If you are referencing the Caption Property of all your Forms, you could be loading some without realizing it, try this instead:
Code:
Private Function CaptionExists(ByVal sCheckCaption As String) As Boolean
Dim oFRM As Form
For Each oFRM In Forms
If oFRM.Caption = sCheckCaption Then
CaptionExists = True
Exit For
End If
Next
End Function
Usage: If CaptionExists("Form2") Then ..
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Feb 1st, 2000, 01:28 AM
#4
Thread Starter
Member
Thank you for all your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|