• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

calling a form from another form

I am calling a form2 from form1, it shows it up but form2 doesn't show the controls on it like labels and textboxes.  also when I put the starposition fro form2  as centerscreen or centerparent it doesn't make any difference.

any idea?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim form2 As New Form
    End Sub
1 Solution
Mike TomlinsonMiddle School Assistant TeacherCommented:
You are creating an instance of a generic form in your code.  Try making an instance of Form2 instead:

    Dim f2 As New Form2

I believe CenterParent only applies to MdiChildren, but CenterScreen should work...

jskfanAuthor Commented:
correct! thanks a lot

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now