I'm working with VB.net and when ever I dynamically create a form when I do
the form.show() or form.visible = true the form.left parameter gets reset to
22. Does anyone have any ideas why this is happening? Below is a copy of
the function:
Private Function Add_Form() As String
Dim FormNew As System.Windows.Forms.Form
Dim LocalMousePosition_Down As Point
Dim LocalMousePosition_Up As Point
'Covert Screen Coordinates To Form Coordinates
LocalMousePosition_Down = _frmHost.PointToClient(_Mouse_Down)
LocalMousePosition_Up = _frmHost.PointToClient(_Mouse_up)
FormNew = New System.Windows.Forms.Form
FormNew.Left = 15
FormNew.Top = 15
FormNew.Size = New System.Drawing.Size(750, 500)
FormNew.Text = "New Form"
FormNew.MdiParent = _frmHost
'_frmHost.Text = "New Form" Don't know why I did this because it changes the
main window
AddHandler FormNew.MouseDown, AddressOf frmGeneric_MouseDown
AddHandler FormNew.MouseUp, AddressOf frmGeneric_MouseUp
'Code to Form Button to Collection
Object_Collection.Add(FormNew)
FormNew.Show()
End Function