I did some digging on the web and figured out what I need. FormB needs to be a child of FormA. All I needed was a few extra lines of code. private void SomeEvent (object sender, someEventArgs e) FormB myForm = new FormB(); *myForm.Owner = this;* myForm.Show*Dialog*();
On Tuesday, May 21, 2013 9:55:00 PM UTC-4, Tom wrote: > I have an application with 2 forms: FormA and FormB. > > FormA has a list of part numbers and categories. If a part is > uncategorized, the user can double click the part, which takes him to FormB > where he can choose a category for that part. After the user categorizes > the part in FormB, FormB closes and the user is sitting on FormA again. > > In FormA, I want to know that FormB has closed and I can refresh the data > so the user knows the part is now categorized. Here is the code in FormA > that calls FormB. > > private void SomeEvent (object sender, someEventArgs e) > FormB myForm = new FormB(); > myForm.Show(); > > The problem I am having is that in the method SomeEvent, it won't execute > any code after myForm.Show(). Is there some event in FormA that fires when > FormB is done? Should I be calling FormB differently? > > I'll be happy to answer any clarifying questions. > > Any help is appreciated. > -- -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to dotnetdevelopment@googlegroups.com To unsubscribe from this group, send email to dotnetdevelopment+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net --- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To unsubscribe from this group and stop receiving emails from it, send an email to dotnetdevelopment+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.