C# 窗体点击关闭按钮时最小化到托盘
Posted on 2009-03-04 16:35 Junn 阅读(152) 评论(0) 编辑 收藏 网摘 所属分类: 心得
private void form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.Hide();
TaskIcon.BalloonTipTitle = "分诊系统";
TaskIcon.BalloonTipText = "程序还在继续运行......" + "\r\n" + "单击托盘图标还原窗口.";
TaskIcon.ShowBalloonTip(2000);
}
}
C# listview中怎么才能显示imagelist中的图片
listview1.SmallImageList = imagelist1;
int j = imagelist1.Images.Count;
for (int i = 0; i < j;i++)
{
ListViewItem li = new ListViewItem();
li.Text = i.ToString();
li.ImageIndex = i;
listview1.Items.Add(li);
}