Jump to content
Xtreme .Net Talk

mcfarljw

Members
  • Posts

    1
  • Joined

  • Last visited

About mcfarljw

  • Birthday 06/12/1987

Personal Information

  • Visual Studio .NET Version
    VB.NET 2008

mcfarljw's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I had problems with VB not consistently centering my form in its parent too. So I created the follow bit and stuck it in a module for reusage. Sub CenterInParent(ByVal parent As Form, ByVal child As Form) Dim frmA As Form = parent Dim frmB As Form = child Dim x As Integer = (parent.Width / 2) - (child.Width / 2) Dim y As Integer = (parent.Height / 2.2) - (child.Height / 2) child.Location = New Point(x, y) End Sub
×
×
  • Create New...