I have a TabControl oriented UI.
That means, that on my main form is a TabControl. TabPages are added dynamic in code.
Within the TabPage I show customer related informations within user controls. In one of these user controls I have a button to add a new order. The new order is shown in a form.
I don't want to show the form modal, so that an interaction with the main form still exists. My problem is, that I don't know how I can set the owner of the new order form can be set to a control.
Because, the "owner" property only accepts types of Forms. But when I set the owner to the form, then the order form is visible on all tab pages, what I don't want.
Dim locNewOrderForm As New frmOrderForm
locNewOrderForm.Show
locNewOrderForm.BringToFront()
' This isn't correct…
' Here I am searching for a solution
locNewOrderForm.Owner = Me.FindForm