docs icon indicating copy to clipboard operation
docs copied to clipboard

compile error

Open dodo99 opened this issue 8 years ago • 1 comments

the following line get errors: (wfh.Child as MyControl1).OnButtonClick += new MyControl1.MyControlEventHandler(Pane1_OnButtonClick);

Error 3 Cannot convert type 'System.Windows.Forms.Control' to 'MyControls.MyControl1' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion c:\users\ttang\documents\visual studio 2013\Projects\WpfHost\WpfHost\MainWindow.xaml.cs 68 14 WpfHost Error 4 Cannot implicitly convert type 'System.Windows.Forms.Control' to 'object' c:\users\ttang\documents\visual studio 2013\Projects\WpfHost\WpfHost\MainWindow.xaml.cs 68 14 WpfHost Error 2 The type 'System.Windows.Forms.Control' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. c:\users\ttang\documents\visual studio 2013\Projects\WpfHost\WpfHost\MainWindow.xaml.cs 68 13 WpfHost Error 1 The type 'System.Windows.Forms.UserControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. c:\users\ttang\documents\visual studio 2013\Projects\WpfHost\WpfHost\MainWindow.xaml.cs 68 13 WpfHost


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

dodo99 avatar Sep 04 '18 20:09 dodo99

This issue has been closed as part of the issue backlog grooming process outlined in #22351.

That automated process may have closed some issues that should be addressed. If you think this is one of them, reopen it with a comment explaining why. Tag the @dotnet/docs team for visibility.

dotnet-bot avatar Jan 25 '21 14:01 dotnet-bot