Results 1 to 6 of 6

Thread: [RESOLVED] Form within form within an MDI interface

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Resolved [RESOLVED] Form within form within an MDI interface

    Hi all.
    Can someone help me out here.

    I want my documents to load up a new form within them but I’m experiencing two problems.

    First is that I can only get the form to load in the first document.
    And second the form within the form hides my scroll bars which I want always on top.

    Attached is a screendump of what I’m experiencing and attached is a shell project.

    Any suggestions?
    Attached Images Attached Images  
    Attached Files Attached Files

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Form within form within an MDI interface

    Can i ask why do you need a form to be inside another mdichild, which is inside a mdiform? There might be an easier way to achieve what you are trying to do

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Form within form within an MDI interface

    Basically I want to allow the user the option of displaying a results flexgrid that can be moved around the form.
    Probably doesn't need to be a form but I'd like the user to know understand that they can move it.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Form within form within an MDI interface

    Worked out how to load the same form within two different forms.
    Obviously the same way as the MDI form does it.

    Can anyone offer anything on the slider being hidden?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Form within form within an MDI interface

    Or alternatively can I make a flexgrid float or a picture float with a flexgrid in it?

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Form within form within an MDI interface

    Worked it out.

    I had to create a frame in the parent form window, put all the parent form controls into it then add this to the parent form.

    VB Code:
    1. Private Sub Form_Load()
    2. Me.Show
    3. Frame1.Left = 0
    4. Frame1.Top = 0
    5. End Sub
    6.  
    7. Sub Form_Resize()
    8. 'Resize Frame1 to form size
    9. Frame1.Width = Me.Width
    10. Frame1.Height = Me.Height

    And add this to the child form.

    VB Code:
    1. Private Sub Form_Load()
    2.     SetParent Me.hWnd, MDI.ActiveForm.Frame1.hWnd
    3. End Sub
    Can I rate my own post?

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