I have a vb.net application that uses ShowDialog() to open child screens.

Long story short, I had issues with focusing the control if I opened IE on top of my program without minimizing the program. Once I reactivated my program and closed a child window, IE would show again instead of my program. I fixed this by setting the owner of my form.

Now I have another issue. After setting the owner, the parent (text) name of my form is now being shown at the top of the application when a child screen is open instead of the parent name. How can I fix this to show only the child's text form name when a child screen is open?

有帮助吗?

解决方案

I tried several things like trying to set the name of the parent's text property.

The only way I could get this to work was by removing the line where I set the owner of my child control, and after the showDialog, setting the parent focus to true:

form.ShowDialog()
Me.Visible = True
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top