using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace doit2 { public partial class Form1 : Form { public Form1() { Song.play(); InitializeComponent(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Media; using System.Reflection; using System.IO; using System.Diagnostics; namespace doit2 { class Song { public static void play() { using (Form1 form = new Form1()) form.MediaPlayer1.URL = Properties.Resources.doitVideo;// the doitvideo is my file in resources, its an mp4 using (Form1 form = new Form1()) form.MediaPlayer1.Ctlcontrols.play(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)