So I want to play a video in winform app, using Windows Media Player, I made everything that Microsoft said in their tutorial, but WMP doesn't play video, it can't "connect to it". And this is the only lines of code that I have for an app
private void Form1_Load(object sender, EventArgs e)
{
axWindowsMediaPlayer1.URL = "D:\\jumpscare.mp4";
}
It finds the video, but it doesn't play it. Or it plays in the back while not showing that on-screen. And when the video "ends", the app crashes with code 3221225477 (0xc0000005) 'Access violation' (video's length is 3 seconds and the app crashes after 3 seconds). I tried different file type (.wmv) and it's the same thing.
Windows 11 Pro 22H2, Visual Studio Community 2022, .NET Framework 4.7.2