📜  使用 c# 代码示例将视频嵌入到 exe 文件

📅  最后修改于: 2022-03-11 14:49:02.940000             🧑  作者: Mango

代码示例1
private void Form_Load(object sender, EventArgs e)
{
    var file=System.IO.Path.Combine(Application.StartupPath, "YourFileName.wmv");
    if (!System.IO.File.Exists(file))
        System.IO.File.WriteAllBytes(file, Properties.Resources.YourFileName);

    this.axWindowsMediaPlayer1.URL = file;
    this.axWindowsMediaPlayer1.Ctlcontrols.play();
}