Results 1 to 6 of 6

Thread: MDI-Form Window List

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    46

    Post

    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

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    253

    Post

    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.

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    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
    [email protected]
    [email protected]
    www.YellowBlazer.com



  4. #4

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    46

    Post

    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~

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    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
    [email protected]
    [email protected]
    www.YellowBlazer.com



  6. #6

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    46

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width