MPIon
Well-known member
I am trying to add a Media Player (or Windows Media Player) to my C# Form.
I have managed to find it (Windows Media Player) in COM components and added it to my application, but there was a message saying it was not enabled and did not show up in the ToolBox.
I have a feeling this is because I created the project as a Windows Forms App rather than a Windows Form App (.Net Framework).
This was confirmed by creating a new project as a Net Framework one, and the Windows Media Player was in the toolbox.
However, now I run into other problems in that some of the features that worked are not supported in the Net Framework one.
e.g. nullable reference types is not available in C# 7.3, Please use language version 8.0 or greater.
Also, it seems as if the Windows Form App (.Net Framework) is using Net 4.7 whereas the original Windows Forms App is using Net 6.
Sorry this is a bit convoluted, but it is difficult to get simple answers in plain English to explain all this.
I am a bit concerned that if I go to the Windows Form App (.Net Framework) I will be using a legacy system which does not support new language features.
So, basically my question is, do I have to use Windows Form App (.Net Framework) to be able to use Media Player, and if so, how do I create the project with Net 5 or 6 and the language version 8 or 9 maybe?
I have managed to find it (Windows Media Player) in COM components and added it to my application, but there was a message saying it was not enabled and did not show up in the ToolBox.
I have a feeling this is because I created the project as a Windows Forms App rather than a Windows Form App (.Net Framework).
This was confirmed by creating a new project as a Net Framework one, and the Windows Media Player was in the toolbox.
However, now I run into other problems in that some of the features that worked are not supported in the Net Framework one.
e.g. nullable reference types is not available in C# 7.3, Please use language version 8.0 or greater.
Also, it seems as if the Windows Form App (.Net Framework) is using Net 4.7 whereas the original Windows Forms App is using Net 6.
Sorry this is a bit convoluted, but it is difficult to get simple answers in plain English to explain all this.
I am a bit concerned that if I go to the Windows Form App (.Net Framework) I will be using a legacy system which does not support new language features.
So, basically my question is, do I have to use Windows Form App (.Net Framework) to be able to use Media Player, and if so, how do I create the project with Net 5 or 6 and the language version 8 or 9 maybe?