C#开发右下角显示图片的应用程序
2017-11-23 01:05
253 查看
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
timer1.Start();
this.notifyIcon1.Visible = true;//在通知区显示Form的Icon
this.WindowState = FormWindowState.Minimized; //不显示窗体
this.Visible = false;
this.ShowInTaskbar = false;//使Form不在任务栏上显示
//具体可以参照图片
}
int a = 0;
private void timer1_Tick(object sender, EventArgs e)
{
a =a + 1;
MessageBox.Show(a.ToString());
}
}
}
![](https://img-blog.csdn.net/20171123001719060?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveXVhbmppbjIwMTY=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
右下角显示图标
![](https://img-blog.csdn.net/20171123002118961?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveXVhbmppbjIwMTY=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
右键点击图标执行
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
this.Close();
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
MessageBox.Show("无用");
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
timer1.Start();
this.notifyIcon1.Visible = true;//在通知区显示Form的Icon
this.WindowState = FormWindowState.Minimized; //不显示窗体
this.Visible = false;
this.ShowInTaskbar = false;//使Form不在任务栏上显示
//具体可以参照图片
}
int a = 0;
private void timer1_Tick(object sender, EventArgs e)
{
a =a + 1;
MessageBox.Show(a.ToString());
}
}
}
右下角显示图标
右键点击图标执行
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
this.Close();
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
MessageBox.Show("无用");
相关文章推荐
- c# Winform/WPF 开发分屏显示应用程序
- VS 2010中WinForm开发(C#)—图片上传到数据库与显示(sql server 2008)
- c# Winform/WPF 开发分屏显示应用程序
- ACCP学习旅程之-----使用C#开发数据库应用程序(第八章 用DataGridView显示和操作数据库)
- c# Winform 开发分屏显示应用程序
- VS 2005中winForm开发(C#)—图片上传到数据库与显示(sql server 2005)
- c# Winform 开发分屏显示应用程序
- c# Winform 开发分屏显示应用程序
- 用C#实现图片数据库存储与显示
- ACCP学习旅程之-----使用C#开发数据库应用程序(第五章 用控件进行快速开发)
- 使用C#和Excel进行报表开发(七)-设置单元格的显示格式
- Android开发技巧——TextView加载HTML的图片及代码显示问题
- android开发视频监控时,抓拍图片存储在相册,图片无法显示问题?通知相册更新即可
- [Android开发] 代码code设置9.png/9-patch 图片背景后,此view中的TextView等控件显示不正常(常见于listview中)
- asp.net(c#)从数据库里读取图片并显示到页面
- C#应用程序单例并激活程序的窗口 使其显示在最前端
- 上传图片并显示缩略图的最简单方法(c#)
- Delphi for iOS开发指南(9):在iOS应用程序中使用ListBox组件来显示TableView
- c# win form 显示支付宝二维码图片
- C#.net中当地址有中文时,图片无法显示解决方法