I've found the solution. Here it is for anyone who ever needs it in the future. The code is: private static AxWMPLib.AxWindowsMediaPlayer wmPlayer;
public static void AddMediaPlayer(Form form1) {
Button b1 = new Button();
b1.Text = "Button";
try {
wmPlayer = new AxWMPLib.AxWindowsMediaPlayer();
((System.ComponentModel.ISupportInitialize)(wmPlayer)).BeginInit();
wmPlayer.Name = "wmPlayer";
wmPlayer.Enabled = true;
wmPlayer.Dock = System.Windows.Forms.DockStyle.Fill;
form1.Controls.Add(wmPlayer);
((System.ComponentModel.ISupportInitialize)(wmPlayer)).EndInit();
// After initialization you can customize the Media Player
wmPlayer.uiMode = "none";
wmPlayer.URL = @"C:\ProjectSilver\assets\RadarDetectie\general\inlog_confirm.ogv";
wmPlayer.Ctlcontrols.play();
}
catch { }
Don't forget to import the library AxWMPLib. After this you'll need to add [STAThread] on top of your class, otherwise you will get an exception.
Goodluck!