[ media ] / 
                                               Makaleler-Article(s)
  
                                            media ile ilgili toplam 3 makale bulundu ! (A total of 3 article(s) about media was(were) found in all of articles!)
  
                                              | Article | 
|---|
 Delphi de MediaPlayer Uygulaması Merhaba arkadaşlar bu makalemizde delphi de basit bir media player uygulaması yapacağız. Formumuza Palette kısmından 1 adet Media Player, ProgressBar, Timer, OpenFileDialog, Button ve 4 adet Label ekleyelim. |  Windows MediaPlayer Şarkı Bilgilerini Göstermek Windows Media Player nesnesinde çalan parçaya ait bilgilerin gösterimini sağlayacağız. İlk önce Formunuza  1 adet MenuStrip, OpenFileDialog, Timer ve Media Player ekleyin.
Media Player i formunuza ekleyebilmek için; |  Media Play Uygulama Formunuza 4 adet Button ve 1 adet TextBox ekleyin.
Aşağıdaki şekli inceleyin.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        [DllImport("winmm.dll")]
        private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);
        public string Pcommand;
        public bool isOpen;
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            
        }
        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "Media Dosya(*.mpg,*.dat,*.avi,*.wmv,*.wav,*.mp3)|*.wav;*.mp3;*.mpg;*.dat;*.avi;*.wmv";
            openFileDialog1.ShowDialog();
            if (openFileDialog1.FileName != "")
                textBox1.Text = openFileDialog1.FileName;
        }
        private void button2_Click(object sender, EventArgs e)
        {
            Pcommand = "Aç \"" + textBox1.Text + "\" tip mpegvideo Media Dosyaları";
            mciSendString(Pcommand, null, 0, IntPtr.Zero);
            isOpen = true;
            Play(true);
        }
        private void button3_Click(object sender, EventArgs e)
        {
            Pcommand = "Media Dosyasını Kapat";
            mciSendString(Pcommand, null, 0, IntPtr.Zero);
            isOpen = false;
        }
        private void button4_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
        public void Play(bool loop)
        {
            if (isOpen)
            {
                Pcommand = "Media Dosyasını Oynat";
                if (loop)
                    Pcommand += " REPEAT";
                mciSendString(Pcommand, null, 0, IntPtr.Zero);
            }
        }
    }
}
//Bir sonraki makalede buluşmak üzere. Bahadır
 |   
                                                
                                           |