A control of mine has a List<Point>
as property which needs to be set when that control is constructed. The individual Point
's have to be taken from mouse-clicks on the form and it has to happen in the Designmode of Visual Studio.
Now my idea was to open a new Form whenever that control is created which would duplicate the original Form, and on the new Form I could click a bit, register the Points, add them to the List Property and close the new Form when I'm done. But I can't seem to apply the original Forms properties to the new one and I guess it's because it doesn't happen while runtime.
This is what I have so far(I know it ain't much, its about the principle):
Showing a new Form when the control is created:
Public Sub New()
InitializeComponent()
Dim myForm As Form = Me.FindForm()
Dim newForm As New newForm(myForm)
scrInput.Show()
End Sub
The new Form:
Public Class SourceForm
Private additionlHeight As Integer = 50
Public Sub New(ScrSource As Form)
InitializeComponent()
Me.Height = ScrSource.Height + additionlHeight
Me.Width = ScrSource.Width
Me.BackColor = ScrSource.BackColor
End Sub
End Class
No updated height, width or background color to be seen on the new form... Any idea?