PDA

Click to See Complete Forum and Search --> : MDI problem...


Gimpster
Dec 6th, 1999, 01:04 AM
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
corneslen@hotmail.com
ICQ# 47799046

Aaron Young
Dec 6th, 1999, 01:34 AM
Try something like this in the Child Form(s) Load Event:

Move (MDIForm1.ScaleWidth - Width) / 2, (MDIForm1.ScaleHeight - Height) / 2

This Centers the Child Form in the MDI Form

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net

BoundLess
Oct 17th, 2006, 12:01 AM
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...