Link to home
Start Free TrialLog in
Avatar of Valleriani
VallerianiFlag for Sweden

asked on

VB6 Form within a form?

Is it possible to open a form within a form? VB6..

What I mean is if I click a button, it will open up the form on the right side, I'll provide what I mean in a image...

As you can see in the image, selecting a button would currently open up a new form and window etc. But I would like to open it up where the blank area is.

The reason why I'd want it like this is because the coding would be seperate and all, would be easier instead of clumping all the coding into one form, considering its mostly all coded already would be a hell hassle to change things around since I've used same variables in some forums...

Any suggestions?
ee.JPG
ASKER CERTIFIED SOLUTION
Avatar of appari
appari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial


good morning...

i suggest u use MDIform as your main form.
then set the MDIChild property of your forms to true..

then position your form left or top base on your selected
area on the right side...


game-master
Avatar of Valleriani

ASKER

Great almost have it! When I try to use me.top to adjust it, it doesn't adjust properly to where I want it. It seems to also move around with the screen, if I put the screen lower, its down more, etc. Wierd!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey there, the left is fine, but when I use .top its all messed up, even if I use 0 it ends up being in the middleish, and if i actaully move the main form then load the form inside, it moves around for some odd reason, but the .left is working properly.

I ended up having to get the screen height and doing a calculation from there

Me.Top = (Screen.Height - frmStart.Height) - frmStart.Top - 2010

2010 being the exact position I want it to be.

Me.Top = (Screen.Height - frmStart.Height) - frmStart.Top seems to stop it from moving in random directions.. But now it seems to load properly with that.