摘要:
C#编写最小化时隐藏为任务栏图标的 Window appllication. 1.设置WinForm窗体属性showinTask=false 2.加notifyicon控件notifyIcon1,为控件notifyIcon1的属性Icon添加一个icon图标。 3.添加窗体最小化事件(首先需要添加事件引用): this.SizeChanged += new System.EventHandler(this.Form1_SizeChanged); //上面一行是主窗体InitializeComponent()方法中需要添加的引用 private void Form1_SizeChanged(ob 阅读全文
摘要:
c#语音识别(上)-tts文字转语音功能 //需要先安装微软公司的speech sdk1.5using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SpeechLib;//导入语音using System.Threading; //线程namespace Text2Speech{ public partial class Fo 阅读全文
摘要:
StreamReader sr = new StreamReader(@"E:\weather.txt", Encoding.GetEncoding("GB2312")); string line; while ((line = sr.ReadLine()) != null) { line = line.Substring(1); string[] str = line.Split('\t'); CityCode cityCode = new CityCode(); cityCode.cc_Id = str[1]; cityCode.cc 阅读全文