I have GUI which is split in two pieces using a SplitContainer Control.
One part is a navigation Panel, the other a workspace Panel.
When I open the app, on start-up a new Form appears (using ShowDialog()), to welcomes Users. I would like to show it centered in the middle of the workspace Panel.
Is there anybody who knows how to solve this?
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
frmWelcome.ShowDialog()
End Sub
Assuming that Panel2 is your
WorkSpacePanel, use its PointToScreen() method to calculate the Screen coordinates offrmWelcomeand position it in the middle.Be sure to set your
frmWelcome.StartPosition = Manual, in the Designer or in its Constructor.Here, I'm using the
Shownevent, to be sure that the pre-set positions inMainFormare already set.