C#实现QQ窗体隐藏(第一版)
来源:互联网 发布:淘宝怎么辨别死人衣服 编辑:程序博客网 时间:2024/05/17 04:46
- //www.wanyouc.com www.cnhgds.com www.yunweis.com www.44dnf.com
- //OK第一版代码如下:Enjoy it!~...
- private void Form1_Load(object sender, EventArgs e)
{
System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer();
StopRectTimer.Tick += new EventHandler(timer1_Tick);
StopRectTimer.Interval = 50;
StopRectTimer.Enabled = true;
this.TopMost = true;
StopRectTimer.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (this.Bounds.Contains(Cursor.Position))
{
switch (this.StopAanhor)
{
case AnchorStyles.Top:
this.Location = new Point(this.Location.X, 0);
break;
case AnchorStyles.Left:
this.Location = new Point(0, this.Location.Y);
break;
case AnchorStyles.Right:
this.Location = new Point(Screen.PrimaryScreen.Bounds.Width - this.Width, this.Location.Y);
break;
case AnchorStyles.Bottom:
this.Location = new Point(this.Location.X, Screen.PrimaryScreen.Bounds.Height - this.Height);
break;
}
}
else
{
switch (this.StopAanhor)
{
case AnchorStyles.Top:
this.Location = new Point(this.Location.X, (this.Height - 8) * (-1));
break;
case AnchorStyles.Left:
this.Location = new Point((-1) * (this.Width - 8), this.Location.Y);
break;
case AnchorStyles.Right:
this.Location = new Point(Screen.PrimaryScreen.Bounds.Width - 8, this.Location.Y);
break;
case AnchorStyles.Bottom:
this.Location = new Point(this.Location.X, (Screen.PrimaryScreen.Bounds.Height - 8));
break;
}
}
}
internal AnchorStyles StopAanhor = AnchorStyles.None;
private void mStopAnhor()
{
if (this.Top <= 0 && this.Left <= 0)
{
StopAanhor = AnchorStyles.None;
}
else if (this.Top <= 0)
{
StopAanhor = AnchorStyles.Top;
}
else if (this.Left <= 0)
{
StopAanhor = AnchorStyles.Left;
}
else if (this.Left >= Screen.PrimaryScreen.Bounds.Width - this.Width)
{
StopAanhor = AnchorStyles.Right;
}
else if (this.Top >= Screen.PrimaryScreen.Bounds.Height - this.Height)
{
StopAanhor = AnchorStyles.Bottom;
}
else
{
StopAanhor = AnchorStyles.None;
}
}
private void Form1_LocationChanged(object sender, EventArgs e)
{
this.mStopAnhor();
}
- C#实现QQ窗体隐藏(第一版)
- C# 实现像QQ一样隐藏窗体
- C#实现类似QQ的隐藏浮动窗体、消息闪动
- C#像QQ一样隐藏窗体
- Delphi下实现QQ窗体自动隐藏
- C# 实现类似QQ的窗体在桌面边缘停靠和隐藏
- Java实现窗体隐藏,功能类似于QQ窗口自动隐藏
- C#实现仿QQ窗体停靠功能
- C#窗体实现QQ截图功能
- C#实现类似QQ的窗体停靠
- C#实现QQ靠边隐藏的功能
- 如何实现象QQ那般隐藏的窗体
- 模拟QQ自动隐藏窗体
- 象QQ窗体一样隐藏
- C#隐藏窗体
- winform实现任务栏隐藏、通知栏图标及右键、类似QQ隐藏窗体等功能
- C#仿QQ皮肤-基窗体FunctionFormBase的实现
- C#类似QQ窗体抖动功能的实现
- sscanf()
- Start
- memcpy和memmove的区别
- 在Win2003下基于Cygwin环境的LEACH安装
- AdjustTokenPrivileges(进程权限)
- C#实现QQ窗体隐藏(第一版)
- 给图片加水印
- 小朋友在我的启发下自己写了个select的联动相关的东西
- ANDROID综合教程系列
- 获取IE历史记录探究性学习(转的)
- Linux Shell学习笔记七
- Using g++
- 基数排序
- VC开发环境下DEBUG和RELEASE的一个区别