Avatar of Valleriani
Valleriani
Flag 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
Visual Basic Classic

Avatar of undefined
Last Comment
Valleriani

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
appari

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
game-master



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
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
game-master

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Valleriani

ASKER
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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes