public static void speckOnWin7(string text),在win7中读文字

public static void speckOnWin7(string text)
{    //洪丰写的,转载请注明
try
{
string lsSource = "";
//if (File.Exists(Application.StartupPath + "\\Error.txt"))
// lsSource = File.ReadAllText(Application.StartupPath + "\\Error.txt");
//string lsT = "\r\n\r\n*************************************************************\r\n" + DateTime.Now.ToString() + "\r\n" + CommInfo.UserId + "\r\n" + CommInfo.UserName + "\r\n*************************************************************\r\n";

string ls_vbs_string=@"CreateObject(""SAPI.SpVoice"").Speak """+text+@"""";
File.WriteAllText(Application.StartupPath + "\\as_speck" + ".vbs", ls_vbs_string, Encoding.GetEncoding("GBK")); //+ DateTime.Now.ToString()
System.Diagnostics.Process.Start(Application.StartupPath + "\\as_speck.vbs");

}
catch (Exception ei)
{
return;
}
}

上一篇:Atitit.软件开发的几大规则,法则,与原则。。。attilax总结


下一篇:Atitit.软件开发概念说明--io系统区--特殊文件名称保存最佳实践文件名称编码...filenameEncode