【发布时间】:2017-02-08 10:47:07
【问题描述】:
我是 .net 新手,无法自动播放视频。我会在这里显示不同的文本框,但我希望视频在没有任何按钮的情况下自动播放
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;
using WMPLib;
namespace ThinkQDisplay
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
{
AxWindowsMediaPlayer1.URL = "C:\Users\Ramrod\Documents\Visual Studio 2012\Projects\ThinkQDisplay\ThinkQDisplay\sample.avi";
}
}
}
它一直告诉它是一个无法识别的转义序列。我也想有一个单独的表格(form2)。我可以在哪里选择在表格 1 上播放的内容。是否也可以循环播放?
【问题讨论】:
-
想一想字符串中的“转义序列”是什么。
-
Giving path of a file in C# 和 many more 获取此错误消息。
-
是的,我包括了;但它仍然说名称文件在当前上下文中不存在,即使我使用 WMPLib 添加;