A
Andy
Hi,
I have a simple problem concerning the position of forms.
My windows form application has a main form and three instances of a
second form; BForm. It is not an MDI parent/child application and I've
set the StartPosition property for both forms to be Manual.
In the New method of the main form I create the 3 BForms and try to
position them below the main form (with the left sides aligned) using
the code below:
intPosX = 100 ' Same as the main form.
intPosY = Me.Top + Me.Height + (intBFormCounter*BForm.Height)
BForm.Location = New Point(intPosX, intPosY)
Note intBFormCounter is a zero based counter of the number of instances
of the BForm.
The three identical forms are correctly aligned and stacked but the
first (uppermost) has its title bar hidden below the lower edge of the
main form. This behaviour remains the same if I change the position of
the main form.
I think that I am not correctly determining the height or lower edge
position of the main form.
Can anyone see what I've missed?
Thanks in advance,
Andy
I have a simple problem concerning the position of forms.
My windows form application has a main form and three instances of a
second form; BForm. It is not an MDI parent/child application and I've
set the StartPosition property for both forms to be Manual.
In the New method of the main form I create the 3 BForms and try to
position them below the main form (with the left sides aligned) using
the code below:
intPosX = 100 ' Same as the main form.
intPosY = Me.Top + Me.Height + (intBFormCounter*BForm.Height)
BForm.Location = New Point(intPosX, intPosY)
Note intBFormCounter is a zero based counter of the number of instances
of the BForm.
The three identical forms are correctly aligned and stacked but the
first (uppermost) has its title bar hidden below the lower edge of the
main form. This behaviour remains the same if I change the position of
the main form.
I think that I am not correctly determining the height or lower edge
position of the main form.
Can anyone see what I've missed?
Thanks in advance,
Andy