الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

تشغيل ملفات wav

مغلق
بدأه C#please في 13 أبريل 2006 · 2 رد · 543 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#2

بارك الله فيك

يمكن أيضا تشغيل الصوت هكذا

using System.Diagnostics;
using System.Runtime.InteropServices;

  static void Main() 
  {
 	 Application.Run(new Form1());
  }
  
  [DllImport("winmm.dll", EntryPoint="PlaySound")]
  public static extern bool PlaySound_DllImport(string pszSound,IntPtr hmod ,int fdwSound );




  private void button1_Click(object sender, System.EventArgs e)
  {
 	 f();
  }

  public void f()
  {
 	 bool result;
 	 System.IntPtr resourceHandle = System.IntPtr.Zero;
 	 result =PlaySound_DllImport("c:\\1.wav",resourceHandle,3);
  }
My_Sign.jpg
#3

جزاك الله خيرا أخي الكريم

هذا الموضوع مغلق.

مواضيع مشابهة