I noticed that after upgrading my software from .NET 4 to 4.8 all of my ShowDialogs send the new form to the primary display rather than keeping it on top of the previous form. It almost seems as if the parent form was assumed in previous versions of the framework? All of the googling I have done is telling me to use ShowDialog(this) to set a parent form but as far as I can tell that sets the forms Owner, not parent.
Dim dlg As dlgCheckUser = New dlgCheckUser(seckey)
Dim dr As DialogResult = dlg.ShowDialog
If dr = DialogResult.No Then
MessageForm.ShowMessageByKey("msg_passcodeFail_OK")
End If
dlg.Dispose()
I tried going through the code and passing a reference all the way down to where it does the ShowDialog but ShowDialog(this) is setting the form owner and there is no "CenterToOwner" method to use in the form_load. I went back and downgraded to .NET 4, changing nothing else and it works perfectly. The dialog form opens right on top of the previous form like it did previously.