|
Windows朗读txt
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace SpeekVoice
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- System.Diagnostics.Process p = System.Diagnostics.Process.Start("introduceVoice.vbs");
- p.WaitForExit();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- APIVoices.MessageBeep(0xFFFFFFFF);
- }
- private void button3_Click(object sender, EventArgs e)
- {
- APIVoices.PlaySound("cricket.wav", 0, APIVoices.SND_FILENAME | APIVoices.SND_ASYNC);
- }
- private void button4_Click(object sender, EventArgs e)
- {
- APIVoices.Beep(800, 200);
- }
- }
- }
复制代码 APIVoices如下:
参考:
|
|