Results 1 to 3 of 3

Thread: MDI problem...

  1. #1

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    I need some enlightenment, here. I've got an MDI form setup, and I am having a problem with getting the forms to display in the position that I want them. What happens is this: I have one form open, and when I click the "find" button that is on it, it opens up another form (both of these forms are MDI Children). However, for some reason, the second form ALWAYS displays exactly below the first form. I've tried setting the top and left position at run-time and design-time. But nothing seems to work. It displays like it is docked at the bottom of the first form. You can move the form once it's displayed, that is, as long as your resolution is high enough to show that much of the screen. That's my problem. If anyone can tell me what is happening, I can try to find out the solution myself. But I don't even know why it's doing that. Thanks.

    ------------------
    Ryan
    [email protected]
    ICQ# 47799046

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try something like this in the Child Form(s) Load Event:
    Code:
        Move (MDIForm1.ScaleWidth - Width) / 2, (MDIForm1.ScaleHeight - Height) / 2
    This Centers the Child Form in the MDI Form

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  3. #3
    Junior Member
    Join Date
    Apr 2005
    Location
    Indonesia
    Posts
    18

    Re: MDI problem...

    lets me overview..

    you have one mdi form and 2 mdi child form
    your startup form for your application is mdi form, after that you call the first form from menu in mdi form, after the first form load in mdi form you call second form from first form with a button ( find button ) is that true ???

    your problem is two form is mdi child, you must set 1 mdi form, 1 mdi child and 1 form ( find ). so when you click find in first form to show second form (find) you just set formfind.show vbmodal, then you can show the find form above the first form

    cheers...
    Just BoundLess

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