Detecting Tools->Options User Input on Form Close in Custom C# User Control. RRS feed

  • Question

  • Hello,

    I followed the steps provided on MSDN for adding a custom tools options page: http://msdn.microsoft.com/en-us/library/b389wd38(v=VS.90).aspx.  I got the user control to show up in Tools->Options, but I am having trouble coming up with a way to know if the user clicked OK or Cancel.  I tried getting the parent form and hooking its FormClosing event to check the result, but I can't actually get the parent form (always returns null).  Do I have to create a class that inherits from DialogPage in order to get this functionality? My user control will be saving to and loading from registry, so I'm not concerned about Visual Studio handling the setting persistence. 


    Thursday, July 28, 2011 5:12 PM


All replies