Results 1 to 7 of 7

Thread: (RESOLVED!!) MDI Form Problems (child management)

  1. #1

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    (RESOLVED!!) MDI Form Problems (child management)

    Well here goes....

    I have developed a highfidelity chat client for a server I've created... As it stands I've created forms on the fly using a template form which holds the richtextbox and other controls such as command buttons and what not.
    each form represents a channel for the server, I used a SSTab Control nested on a picturebox (or coolbar) control.
    I use an array to hold the name of the channel joined and compare it with the captions of each form created.. in order to manage the forms

    now I've come across a problem where I have to create a private dialog session which I can't think of any ways to do so


    is there any controls that are like the windows taskbar for an MDI application that can easily manage all mdi child forms?



    I've included a screenshot of my client with a large black arrow pointing to the sstab control which I currently use at the momment but have run into the problem.


    any ideas?
    Attached Images Attached Images  
    Last edited by TokersBall_CDXX; May 26th, 2003 at 11:46 AM.
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  2. #2

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    bump

    bump
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  3. #3
    Addicted Member
    Join Date
    Jan 2002
    Location
    http://www.vbforums.com
    Posts
    164

    Re: bump

    Originally posted by TokersBall_CDXX
    bump
    I've been trying to do the same thing but till now I still couldn't find any control like you've described. I'm simulating the taskbar by adding array of buttons on a toolbar which represent each of of the loaded form. (I used Tag to identify the windows).

    I'lll appreciate it if you can PM me when you found a nice control for the taskbar.

    Cheers!
    "If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"

  4. #4

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    bump

    bump



    any one?
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  5. #5
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Right, so for each chat session open you want a seperate form instead of a tab on the SSTab control and you want to handle this using an MDI form...?

    Why?

    Why not do what MS Messenger does...has seperate forms that open for each session, which are visible in the task bar.

    You have one form in your project, with all the controls and code to handle one session...then use:
    VB Code:
    1. 'In a module
    2. Option Explicit
    3.  
    4. Private mcolSessions  As Collection
    5.  
    6. Private Const  FORM_KEY As String = "hWnd"
    7.  
    8. Public Sub CreateNewSession(ByRef plngIP As String)
    9. Dim frmNew As frmSession
    10.    Set frmNew = New frmSession
    11.    frmNew.Connect plngIP
    12.    Load frmNew
    13.    Call AddSession(frmNew)
    14.    frmNew.Show
    15.    Set frmNew = Nothing
    16. End Sub
    17.  
    18. Private Sub AddSession(ByRef pfrmSession As Form)
    19.    If mcolSessions Is Nothing Then
    20.       Set mcolSessions = New Collection
    21.    End If
    22.    mcolSessions.Add pfrmSession, CStr(pfrmSession.hWnd) & FORM_KEY
    23. End Sub
    24.  
    25. Public Sub RemoveSession(ByRef plnghWnd As Long)
    26.    mcolSessions.Remove CStr(plnghWnd) & FORM_KEY
    27.    If mcolSessions.Count = 0 Then
    28.       Set mcolSessions = Nothing
    29.    End If
    30. End Sub
    Then...
    VB Code:
    1. 'In the form frmSession
    2. Public Sub Connect(ByVal pstrIP As String)
    3.     'Code to connect here
    4. End Sub
    5.  
    6. Private Sub Form_Unload()
    7.    RemoveSession Me.hWnd
    8. End Sub
    Does that help?

    Woka

  6. #6

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    Re: MDI Form Problems (child management)

    Originally posted by TokersBall_CDXX
    Well here goes....

    I have developed a highfidelity chat client for a server I've created... As it stands I've created forms on the fly using a template form which holds the richtextbox and other controls such as command buttons and what not.
    each form represents a channel for the server, I used a SSTab Control nested on a picturebox (or coolbar) control.
    I use an array to hold the name of the channel joined and compare it with the captions of each form created.. in order to manage the forms

    now I've come across a problem where I have to create a private dialog session which I can't think of any ways to do so


    is there any controls that are like the windows taskbar for an MDI application that can easily manage all mdi child forms?



    I've included a screenshot of my client with a large black arrow pointing to the sstab control which I currently use at the momment but have run into the problem.


    any ideas?

    well since no one here could help me out, I had to use alterior methods and convert a usercontrol that took way too long to make into an activeX OCX


    so for all those out there that really need a control like this here ya go ;o) despite un-answered questions or non-qualified help..
    MDITASK BAR FREE!!!!
    Attached Files Attached Files
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  7. #7
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Don't post compiled OCX's, DLL's or EXE's...
    They are not much use to anyone plus, anyone who is stupid enough to run that on their PC deserves to get their hard drive trashed.

    If you JUST wanted a menu bar in an MDI form then when you show a form, why not just add an extra button to a standard toolbar?!

    I can't see what's so hard about this problem...very basic.

    Woka

    PS Post your source code for the control

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