托盘程序闪动图标问题!
我想做的是一个新闻提醒小程序,如果有新的新闻托盘图标就闪动!为什么第一次闪动正常第二就不正常了闪动图标非常快,第三次有正常闪了!不知道为什么!希望高手帮我看下代码!或提供一些这方面的例子!using System;
using System.IO;
using System.Net;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Collections.Generic;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
private bool m_bFlag = true;
//根据Url地址得到网页的HTML源码
private string GetWebContent(string Url)
{
string strResult = " ";
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
//声明一个HttpWebRequest请求
request.Timeout = 30000;
//设置连接超时时间
request.Headers.Set( "Pragma ", "no-cache ");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream streamReceive = response.GetResponseStream();
Encoding encoding = Encoding.GetEncoding( "gb2312 ");
StreamReader streamReader = new StreamReader(streamReceive, encoding);
strResult = streamReader.ReadToEnd();
streamReader.Close();
}
catch
{
&nbs