文件名称:csharptraysrc
-
所属分类:
- 标签属性:
- 上传时间:2013-05-22
-
文件大小:30.7kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
C#系统托盘程序示例源代码,知识点:
1、添加一个 NotifyIcon 组件和一个 ContextMenuStrip组件到主窗体
2、设置notifyIcon1控件的ContextMenuStrip属性为 contextMenuStrip1,将用户单击托盘图标显示的菜单指向 contextMenuStrip1
3、notifyIcon1.Visible = true //显示托盘图标
4、this.ShowIcon = true //应用程序窗口是否显示图标
5、this.ShowInTaskbar = true //是否在windows任务栏显示图标
6、this.WindowState = FormWindowState.Normal //设置窗口的显示状态(最大化、最小化和普通模式)
7、form2.Owner = this //设置拥有此窗体的窗体,this代表主窗体附属窗体随主窗体的显示而显示
form2.ShowInTaskbar = false
form2.Show()
8、Form1 formmain = new Form1() //form2的窗体关闭并显示form1窗体
formmain = (Form1)this.Owner //将全局变量this.Owner强制转换给FormMain类型-C# system tray program source code examples and knowledge points: 1, add a NotifyIcon component and a ContextMenuStrip component to the main form 2, set the control' s ContextMenuStrip property notifyIcon1 contextMenuStrip1, the user clicks on the tray icon to display a menu point contextMenuStrip1 3, notifyIcon1 . Visible = true // display the tray icon 4, this.ShowIcon = true // application window is displayed icons 5, this.ShowInTaskbar = true // whether to display an icon in the windows task bar 6, this.WindowState = FormWindowState . Normal // set the window display state (maximize, minimize and normal mode) 7, form2.Owner = this // set form with this form, this form represents the main form affiliated with the main window body of the display and display form2.ShowInTaskbar = false form2.Show () 8, Form1 formmain = new Form1 () // form2 and show form1 form closed form formmain = (Form1) this.Owner // The global variable this.Owner cast to type FormMain
1、添加一个 NotifyIcon 组件和一个 ContextMenuStrip组件到主窗体
2、设置notifyIcon1控件的ContextMenuStrip属性为 contextMenuStrip1,将用户单击托盘图标显示的菜单指向 contextMenuStrip1
3、notifyIcon1.Visible = true //显示托盘图标
4、this.ShowIcon = true //应用程序窗口是否显示图标
5、this.ShowInTaskbar = true //是否在windows任务栏显示图标
6、this.WindowState = FormWindowState.Normal //设置窗口的显示状态(最大化、最小化和普通模式)
7、form2.Owner = this //设置拥有此窗体的窗体,this代表主窗体附属窗体随主窗体的显示而显示
form2.ShowInTaskbar = false
form2.Show()
8、Form1 formmain = new Form1() //form2的窗体关闭并显示form1窗体
formmain = (Form1)this.Owner //将全局变量this.Owner强制转换给FormMain类型-C# system tray program source code examples and knowledge points: 1, add a NotifyIcon component and a ContextMenuStrip component to the main form 2, set the control' s ContextMenuStrip property notifyIcon1 contextMenuStrip1, the user clicks on the tray icon to display a menu point contextMenuStrip1 3, notifyIcon1 . Visible = true // display the tray icon 4, this.ShowIcon = true // application window is displayed icons 5, this.ShowInTaskbar = true // whether to display an icon in the windows task bar 6, this.WindowState = FormWindowState . Normal // set the window display state (maximize, minimize and normal mode) 7, form2.Owner = this // set form with this form, this form represents the main form affiliated with the main window body of the display and display form2.ShowInTaskbar = false form2.Show () 8, Form1 formmain = new Form1 () // form2 and show form1 form closed form formmain = (Form1) this.Owner // The global variable this.Owner cast to type FormMain
(系统自动生成,下载前可以参看下载内容)
下载文件列表
csharptraysrc/系统托盘程序示例/26.ico
csharptraysrc/系统托盘程序示例/Form1.cs
csharptraysrc/系统托盘程序示例/Form1.Designer.cs
csharptraysrc/系统托盘程序示例/Form1.resx
csharptraysrc/系统托盘程序示例/FormMain.cs
csharptraysrc/系统托盘程序示例/FormMain.Designer.cs
csharptraysrc/系统托盘程序示例/FormMain.resx
csharptraysrc/系统托盘程序示例/Program.cs
csharptraysrc/系统托盘程序示例/Properties/AssemblyInfo.cs
csharptraysrc/系统托盘程序示例/Properties/Resources.Designer.cs
csharptraysrc/系统托盘程序示例/Properties/Resources.resx
csharptraysrc/系统托盘程序示例/Properties/Settings.Designer.cs
csharptraysrc/系统托盘程序示例/Properties/Settings.settings
csharptraysrc/系统托盘程序示例/系统托盘程序示例.csproj
csharptraysrc/系统托盘程序示例.sln
csharptraysrc/系统托盘程序示例.suo
csharptraysrc/系统托盘程序示例/Properties
csharptraysrc/系统托盘程序示例
csharptraysrc
csharptraysrc/系统托盘程序示例/Form1.cs
csharptraysrc/系统托盘程序示例/Form1.Designer.cs
csharptraysrc/系统托盘程序示例/Form1.resx
csharptraysrc/系统托盘程序示例/FormMain.cs
csharptraysrc/系统托盘程序示例/FormMain.Designer.cs
csharptraysrc/系统托盘程序示例/FormMain.resx
csharptraysrc/系统托盘程序示例/Program.cs
csharptraysrc/系统托盘程序示例/Properties/AssemblyInfo.cs
csharptraysrc/系统托盘程序示例/Properties/Resources.Designer.cs
csharptraysrc/系统托盘程序示例/Properties/Resources.resx
csharptraysrc/系统托盘程序示例/Properties/Settings.Designer.cs
csharptraysrc/系统托盘程序示例/Properties/Settings.settings
csharptraysrc/系统托盘程序示例/系统托盘程序示例.csproj
csharptraysrc/系统托盘程序示例.sln
csharptraysrc/系统托盘程序示例.suo
csharptraysrc/系统托盘程序示例/Properties
csharptraysrc/系统托盘程序示例
csharptraysrc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.