I am learning MS Visual C#.net (2003), converting from MS (MFC) C++.
I have a single dialog application where I have double clicked on the dialog box HelpRequested property entry to get an application_HelpRequested method. This is called by pressing F1. I then display a message box [ MessageBox.Show(…) ]. This all works as expected. My problem is that I seem to get two message boxes. Specifically when I OK one, another appears. If I move the first one there isn’t another underneath it. The second one seems to appear only after the first one is closed.
I thought I could trap it by using a bool variable around the MessageBox.Show(…), setting a “homemade” visibility flag. If the method was being called a second time before the first one had completed only one box would have appeared. That didn’t work. It looks like the framework is making two method calls for one F1 push.
This is not the end of the world, but I hate programs doing what they want rather than what I want!
Any insights welcomed.
I have a single dialog application where I have double clicked on the dialog box HelpRequested property entry to get an application_HelpRequested method. This is called by pressing F1. I then display a message box [ MessageBox.Show(…) ]. This all works as expected. My problem is that I seem to get two message boxes. Specifically when I OK one, another appears. If I move the first one there isn’t another underneath it. The second one seems to appear only after the first one is closed.
I thought I could trap it by using a bool variable around the MessageBox.Show(…), setting a “homemade” visibility flag. If the method was being called a second time before the first one had completed only one box would have appeared. That didn’t work. It looks like the framework is making two method calls for one F1 push.
This is not the end of the world, but I hate programs doing what they want rather than what I want!
Any insights welcomed.