TipeMessage项目用到的新知识点 Kevin

1.仿QQ托盘消息闪动:

原理:当有消息来的时候,托盘图标以彩色图标和透明图标来回切换表现闪动效果。

2.播放WAV文件

System.Media.SoundPlayer player = new System.Media.SoundPlayer();
                player.SoundLocation = Application.StartupPath + "\\msg.wav";
                player.Play();

3. 调用Chrome打开指定网址

Process process = new Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = "chrome.exe";
process.StartInfo.Arguments = url;
process.Start();

 注意:Process.StartInfo.UserShellExcute 属性指定的是否调用操作系统的Shell来启动应用程序。

该属性值为true,调用系统的shell启动程序,其效果跟启动另一个无关的程序一样。

该属性值为false,不调用系统的shell启动程序,是在该程序调用chrome 会被360等安全软件软件认为是该程序试图访问网络。

原文地址:https://www.cnblogs.com/kfx2007/p/2705006.html