Can't use Windows Media Player in Visual C#

Jeffrey Schwartz 101 Reputation points
2021-05-24T15:23:19.853+00:00

I am writing a simple Windows Form Application in (recently installed) Visual C# in Visual Studio Community 2019. I want to play a video in a form. The Windows Media Player control wasn't in the toolbox. I was able to install the Windows Media Player component but I got the following error message: "The following controls were successfully added to the toolbox but are not enabled in the active designer."

I don't know how to interpret this message or what steps I can take to make the control available to me. Any suggestions? Thank you in advance for your time and attention.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,277 questions
{count} votes

Accepted answer
  1. Timon Yang-MSFT 9,576 Reputation points
    2021-05-25T01:54:15.993+00:00

    This error is generally due to incompatibility between the component and the current designer.

    Are you using .Net Framework or .Net Core?

    When I follow the steps in the documentation to use this control under .Net Framework, it works fine.

    Using the Windows Media Player Control with Microsoft Visual Studio

    99312-1.png

    Update(5/26):
    When we add a new project. We can see two Windows Forms App.

    99662-1.png

    The first is .Net Framework and the second is .Net Core. You don't need to install anything to use them.

    As for the designer, we call this the designer:

    99632-2.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful