Notice
Recent Posts
Recent Comments
분노의 챔질
C# Windows Media Player 사용하기 본문
반응형
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
axWindowsMediaPlayer1.Ctlcontrols.play();
}
private void button2_Click(object sender, EventArgs e)
{
axWindowsMediaPlayer1.Ctlcontrols.stop();
}
private void button3_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
axWindowsMediaPlayer1.URL = dlg.FileName;
axWindowsMediaPlayer1.Ctlcontrols.stop();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
반응형
'Programming > C#' 카테고리의 다른 글
C# delegate (0) | 2024.05.28 |
---|---|
C# Event (0) | 2024.05.28 |
UltraGrid에서 Ctrl+C (0) | 2021.04.13 |
C# 키보드 마우스 후킹 HOOK (0) | 2018.07.04 |
C# wave파일 간단하게 (0) | 2017.04.27 |