I want a sub form to open with its Top and Left location in a particular loaction relative to the main Form. Is this possible?
For example my “2nd” form opens with its Top/Left corner 2 inches from the TOP/LEFT corner of my main form.
To get specific positioning like that you’ll have to write your own function. If you set the window Behavior/Placement setting in the IDE to “Parent Window Screen” the window will position itself relative to the currently open window for you.
Something like this might work, but this is untested.
[code]Public Sub ShowNextTo(twinTarget as Window, tbOnTheRight as Boolean)
const kSpacing = 4
self.Top = twinTarget.Top
if tbOnTheRight then
self.Left = twinTarget.Left + twinTarget.Width + kSpacing
self.Left = twinTarget.Left - self.Width - kSpacing
Edit: You would use it like this
dim toPanel as new winSubform
Once again thanks!
Using your suggestion I simplefied it to
self.Top=Form_HomeScreen.top + 160
self.left=Form_HomeScreen.left + 310