C# ʹÓÃPlaySoundÔÚÒÆ¶¯É豸Éϲ¥·ÅÉùÒô
ʹÓà PlaySound ÔÚÒÆ¶¯É豸Éϲ¥·ÅÉùÒôÎļþ¡£´Ë´úÂëʹÓà System.Runtime.InteropServices
µ÷Óà Compact Framework µÄ CoreDll.DLL µÄ PlaySound ·½·¨
¹ØÓÚ²¥·ÅʵÏÖ£º
//²¥·Å±êÖ¾
private enum Flags
{
SND_SYNC = 0x0000,
SND_ASYNC = 0x0001,
SND_NODEFAULT = 0x0002,
SND_MEMORY = 0x0004,
SND_LOOP = 0x0008,
SND_NOSTOP = 0x0010,
SND_NOWAIT = 0x00002000,
SND_ALIAS = 0x00010000,
SND_ALIAS_ID = 0x00110000,
SND_FILENAME = 0x00020000,
SND_RESOURCE = 0x00040004
}
[DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError = true)]
private extern static int MobilePlaySound(string szSound, IntPtr hMod, int flags);
public void PlaySound(string fileName)
{
MobilePlaySound(fileName, IntPtr.Zero, (int)(Flags.SND_ASYNC | Flags.SND_FILENAME));
}
¹ØÓÚֹͣʵÏÖ£º
PlaySound(null);
¹ØÓÚPlaySoundº¯Êý£º
Ò».PlaySoundº¯ÊýµÄÉùÃ÷Ϊ£º
BOOL PlaySound(LPCSTR pszSound,HMODULE hmod,DWORD fdwSound);
1.²ÎÊýpszSound:ÊÇÖ¸¶¨ÁËÒª²¥·ÅÉùÒôµÄ×Ö·û´®,¸Ã²ÎÊý¿ÉÒÔÊÇWAVEÎļþµÄÃû×Ö,»òÊÇWAVE×ÊÔ´µÄÃû×Ö,»òÊÇÄÚ´æÖÐÉùÒôÊý¾ÝµÄÖ¸Õë,»òÊÇÔÚϵͳע²á±íWIN.INIÖж¨ÒåµÄϵͳʼþÉùÒô.Èç¹û¸Ã²ÎÊýΪNULLÔòÍ£Ö¹ÕýÔÚ²¥·ÅµÄÉùÒô.
2.²ÎÊýhmod:ÊÇÓ¦ÓóÌÐòµÄʵÀý¾ä±ú,µ±²¥·ÅWAV×Ê
Ïà¹ØÎĵµ£º
C#
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Config/User_yhlx_Jb.xml"));
DataView dv = ds.Tables[0].DefaultView;
//dv.RowFilter = "State=0";
this.DropDownList1.DataSource = dv;
this.DropDownList1.DataTextField = "text";
this ......
×÷Õߣº¹â½ÅѾ˼¿¼ ʱ¼ä£º12/23/2009 1:51:00 PM
Ò»¿ªÊ¼¾Í¾õµÃHTML±à¼Æ÷ÕâÍæÒâÓ¦¸ÃÊǺܸßÉîβâµÄ¡£ËæËæ±ã±ã¾ÍÏëÕûÒ»¸öÓ¦¸Ã²»ÊÇÒ»¼þÈÝÒ×µÄÊÂÇé¡£ºóÀ´¶ÔWebBrowser¿Ø¼þÓÐÁËһЩÁ˽⣬²»¹ý¶¼ÊǺܷôdzµÄÁ˽⡣ֻ֪µÀÓÃÕâ¸ö¿Ø¼þ¾ÍÄܹ»ÔÚ×Ô¼ºµÄ³ÌÐòÖиãÒ»¸öWEBä¯ÀÀÆ÷Ö®ÀàµÄ¶«Î÷£¬´ÓÀ´Ã»ÓÐÏë¹ýHTML±à¼Æ÷Ò²¿ÉÒÔʹÓÃÕâ¸ö¿Ø¼þÀ´ÊµÏ ......
RT¡£ÏÈÌù´úÂë
C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Value_Ref_test1
{
class Program
{
static void Main(string[] args)
{
point a = new point (10,10) ;
point b = a;
......
ÏÈÌù´úÂë
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ref_and_Out_test
{
class Program
{
static void Main(string[] args)
& ......