Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REFERENCE WINDOWLIST ITEMS - MDI INTERFACE

Status
Not open for further replies.

wekkew

Programmer
Sep 28, 1998
123
GB
Hello
Trying to do something that seems so straighforward
but it's driving me up the wall. Have standard MDI
interface, with WindowList in MDI menu. so far, so good.

How do I access the list of child forms displayed under
WindowList. I know I can access the child forms using the code below but it's annoying that I can't access the windowlist list! :)

For Each f In Forms
If (Not TypeOf f Is MDIForm) Then
If (f.MDIChild = True) Then
MsgBox f.Caption
End If
End If
Next f

thanks

kate
 
Sorry, that's the way you do it. The WindowList is a special "feature" that VB provides to you. Unfortunately, they don't provide a way to access it.

If you think this is bad, you ought to look at programming a VB Add-In. It's events are all in the wrong place, and aren't always named what you think they ought to be (sample: Close your VB project, and create a new one. Instead of the "Add Project" firing, the "Rename Project" fires. Arrrggg!)

Chip H.
 
Dear chipH

Thanks for that - you sound like you're having a bad day!
Have you ever tried to configue a Personal Web Server on a
stand-alone machine with FrontPage 2000? That would be my
definition of hell!
Still, when VB.NET comes out everything will be perfect
won't it :)
Just one final question...
Can't I even access the windowlist through an API??

Kate

 
Yes, you should be able to do it through an API. I don't recall the exact steps but basically you find out what the MDI parent's hWnd is, then iterate through all open windows, looking for ones where that hWnd is listed as being the parent window, and the Window Class is listed as being a ThunderForm (the internal name for VB's windows).

Chip H.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top