Click to See Complete Forum and Search --> : MDI-Form Window List
Kiron
Nov 25th, 1999, 03:44 PM
Hello, I want to make a program that have main MDI form and MDI-child documents.
I want to make a tree control with all the open document windows.
--what I like to know is how does the WindowList (menu with WindowsList checked) knowes all the open windows, and what in the unique property in each window.
If it's hWnd then how can i change or select the MDI-child window if i have his hWnd?
Thank you
Kiron
Forest Dragon
Nov 25th, 1999, 08:01 PM
I think you should create a collection of the child-windows and everytime a new one is created, add the instance of it to the collection. Thus you will be able to add all the child-windows to the tree-view control by using this collection.
Joacim Andersson
Nov 25th, 1999, 08:28 PM
You can simply loop through the Forms collection:
Dim frm As Form
On Error Resume Next 'importent! MDI forms lack the MdiChild Property
For Each frm In Forms
If frm.MDIChild = True Then
'Code to add this form to the treeview goes here
End If
Next
Good luck!
------------------
Joacim Andersson
joacim@programmer.net
joacim@yellowblazer.com
www.YellowBlazer.com (http://www.YellowBlazer.com)
Kiron
Nov 26th, 1999, 03:15 AM
Thank you very much for the fast answer! :)
I think i will do that collection, the only thing i think is it's will take some memory to hold all the MDI-child forms objects.
But it's ok.
--The other thing i like to know is:
What is the best control for text edit? (one that can open large amount of data (>32k)).
The other thing is how can i read file fast? again file that bigger the 32kb, that [String] can hold only 255 chars, how can i make a variable that can hold let's say 1024 (with no collections. only one variable)
Thank you very much again.
Ido Ran
Bye~
Joacim Andersson
Nov 26th, 1999, 10:17 PM
A VB String isn't limited to 255 bytes. You can assign as many bytes of text you want (or at least until your computer memory is out).
A standard RichTextBox can contain text files larger then 32k.
Good luck!
------------------
Joacim Andersson
joacim@programmer.net
joacim@yellowblazer.com
www.YellowBlazer.com (http://www.YellowBlazer.com)
Kiron
Nov 27th, 1999, 02:57 AM
Ok, thank you very much.
I will try the string larger then 255, but is there any way to read large file?
The secound thing is how can i know the line and column that the cursor is standing at (like in VB editer, where-ever you sand it's how you the line no. and column).
P.S.
Do you know any Text box control that know to show colored text like in VB editer?
Thank you very much
Kiron
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.