Isabella
---- I fell upon the thorn of life, I bleed.
摘要: 如果你不想自己的程序被从Ctrl+Alt+Del弹出的窗口中强行关闭,介绍一个Windows未公布的API函数给你:RegisterServiceProcess(ProcessID:Long,Type:Long)该函数存在于Kernal32.dll中.Process指向进程的ID,Type表示是否向系统注册该进程,是1,否0.= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 阅读全文
posted @ 2011-12-29 11:07 李昀璟 阅读(212) 评论(0) 推荐(0)
摘要: C# Winform 右下角弹出窗口,延迟5秒关闭及手动关闭子窗体的部分代码:[DllImport("user32")] private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags); //下面是可用的常量,根据不同的动画效果声明自己需要的 private const int AW_HOR_POSITIVE = 0x0001;//自左向右显示窗口,该标志可以在滚动动画和滑动动画中使用。使用AW_CENTER标志时忽略该标志 private const int AW_HOR_NEG 阅读全文
posted @ 2011-12-29 10:56 李昀璟 阅读(2994) 评论(0) 推荐(0)
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Runtime.InteropServices;namespacetestWinForm{publicpartialclassForm2:Form{publicForm2(){InitializeComponent();SetClassLo 阅读全文
posted @ 2011-12-29 10:47 李昀璟 阅读(4328) 评论(1) 推荐(0)
摘要: 代码:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Drawing.Drawing2D;usingSystem.Drawing;namespacetestWinForm{publicpartialclassForm1:Form{publicForm1(){InitializeCompo 阅读全文
posted @ 2011-12-29 10:40 李昀璟 阅读(239) 评论(0) 推荐(0)
摘要: (1)、在窗口上点击关闭按钮或者最小化时将托盘显示; (2)、双击托盘图标显示窗口;(3)、右键点击托盘图标提供三个菜单选项,“退出”、“隐藏”、“显示”; (4)、程序可以设置开机启动,隐藏任务栏显示。就这四个小功能。1、建一个WinForm程序—TestIconForm,将其属性ShowInTaskbar改为false,这样程序将不会在任务栏中显示;将MaximizeBox属性设置为false,屏蔽掉最大化按钮;把StartPosition属性改为CerternScreen,这样程序运行后,窗口将会居中显示。2、在工具栏中的公共控件里,拖入NotifyIcon控件—testNotif... 阅读全文
posted @ 2011-12-29 10:12 李昀璟 阅读(421) 评论(0) 推荐(0)
摘要: 蛋疼的让C#控制台程序(Console)像窗体(Winform)一样(关闭,托盘图标,事件响应,手动退出等)前言:你可以把这篇文章定义为一篇蛋疼的文章,应为这个东西不怎么实用,还费神,没事折腾这做什么。恩,的确,蛋疼。我也同意,就算蛋疼也有它的小众范围,当你不想做webservers,winform等,就想蛋疼的拿控制台来做服务,做程序,行吗?行,但是控制台一点关闭就退出了,有时会点错,控制台没有托盘图标,想最小化到托盘图标等,还有什么蛋疼的想法,来吧,让我们来实现他们。需要了解:console application是控制台程序。控制台不是winform,我们不能设置它的关闭事件等。控制台虽 阅读全文
posted @ 2011-12-29 10:01 李昀璟 阅读(9608) 评论(4) 推荐(7)
摘要: .NET WinForm 窗体设置大全转自:http://hi.baidu.com/%B7%C5%D1%F2de%CD%F5%D7%D3/blog/item/81b7bbc4e618de480eb34565.html目录1. 如何设置一个From的边界2. 如何建立一个透明的From3. 如何设置窗体在屏幕中的位置4. 如何使最小化和最大化按钮不可用5. 如何使一个窗体不见6. 如何设置使窗体成为非矩形的.7. 如何使一个窗体在屏幕的最顶端.8. 如何显示一个Model和非Model的窗体9. 如何制作一个MDI的窗体10. 如何将你的窗体不显示在任务条上.11. 如何制作一个带启动屏幕的窗体 阅读全文
posted @ 2011-12-29 09:55 李昀璟 阅读(7068) 评论(0) 推荐(1)