c# windows mobile 播放Wma

Jaly1991 2010-11-03 05:14:47
c# windows mobile 播放Wma
这个Wma 已经在包里直接读取播放 不是打开。
...全文
84 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jaly1991 2010-11-03
  • 打赏
  • 举报
回复
谢了。。。
June1991 2010-11-03
  • 打赏
  • 举报
回复
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//
using System.Threading;
using System.Runtime.InteropServices;
using System.IO;

namespace SoundTest
{
public partial class Form1 : Form
{
string mySoundLocation = string.Empty;
string apppath = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
public Form1()
{
InitializeComponent();
apppath = Path.GetDirectoryName(apppath);
}

[DllImport("aygshell.dll")]
static extern uint SndOpen(string pszSoundFile, ref IntPtr phSound);
[DllImport("aygshell.dll")]
static extern uint SndPlayAsync(IntPtr hSound, uint dwFlags);
[DllImport("aygshell.dll")]
static extern uint SndClose(IntPtr hSound);
[DllImport("aygshell.dll")]
static extern uint SndStop(int SoundScope, IntPtr hSound);
[DllImport("aygshell.dll")]

static extern uint SndPlaySync(string pszSoundFile, uint dwFlags);
const int SND_SCOPE_PROCESS = 0x1;

public string SoundLocation
{
get { return mySoundLocation; }
set { mySoundLocation = value; }
}
IntPtr mySound = IntPtr.Zero;
public void Play()
{
SndOpen(mySoundLocation, ref mySound);
SndPlayAsync(mySound, 0);
}

private void button1_Click(object sender, EventArgs e)
{
mySoundLocation = apppath + "\\test.mp3";
Play();
}
}
}
看看。。。。
wuguoxian001 2010-11-03
  • 打赏
  • 举报
回复
路过 楼主说的不是很清楚
Jaly1991 2010-11-03
  • 打赏
  • 举报
回复
知道的高手帮下忙。。
无涯大者 2010-11-03
  • 打赏
  • 举报
回复
C# windows mobile不太懂 路过
内容概要:本文围绕“新型电力系统下多分布式电源接入配电网承载力评估方法”的研究,系统性地介绍了基于Matlab的仿真建模与代码实现方案,旨在评估高比例分布式电源(如光伏、风电等)接入背景下配电网的接纳能力。研究融合了智能优化算法(如蜣螂优化、灰狼优化、遗传算法)、多目标优化、鲁棒优化及双层优化模型,结合潮流计算、稳定性分析与故障仿真,构建了完整的承载力评估体系。文档不仅提供核心算法实现,还拓展至微电网调度、储能配置、电氢耦合系统、电动汽车协同等前沿方向,强调“复现+创新”相结合的科研路径,助力研究者快速掌握高水平论文复现技巧并激发原创思路。; 适合人群:具备电力系统、自动化或相关专业背景,熟悉Matlab/Simulink仿真环境,正在从事科研或工程应用的研究生及初级科研人员(工作1-3年);; 使用场景及目标:①复现高水平期刊中关于配电网承载力的优化模型;②开展高比例可再生能源接入下的配电网规划与运行研究;③学习并应用智能优化算法解决复杂电力系统问题;④获取完整科研资源包以加速课题进展与论文撰写; 阅读建议:建议读者关注公众号“荔枝科研社”获取网盘资源,下载全套代码与模型文件,按照文档结构循序渐进学习,重点理解算法设计逻辑与仿真建模细节,结合所提供的复现案例深化对优化模型与工程应用场景的理解,提升科研效率与创新能力。

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧