I am creating a Visual Studio options page exactly as described in the example - Walkthrough: Creating an Options Page located athttp://msdn.microsoft.com/en-us/library/bb166195.aspx- I am receiving the following error - Cannot implicitly convert type '...MyUserControl' to 'System.Windows.Forms.IWin32Window'' as I return the usercontrol page to IWin32Window for the following code:
[Browsable(false)] [DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)] protected override IWin32Window Window { get { MyUserControl page = new MyUserControl(); page.optionsPage = this; page.Initialize(); return page; } }
I tried explicit conversion and received and an invalid cast exception. The platform is Windows 8.1 and Visual Studios 2013 update 2.