1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using System.Diagnostics;
[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);
public string befehl;
private void btn_laden_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
label1.Text = openFileDialog1.FileName;
befehl = "open \"" + label1.Text +"\" type MPEGVideo alias MediaFile";
mciSendString(befehl, null, 0, IntPtr.Zero);
}
}
private void txt_Abspielen_Click(object sender, EventArgs e)
{
befehl = "play MediaFile from 0";
mciSendString(befehl , null, 0, IntPtr.Zero);
}
|