模仿视屏软件,定时将pan隐藏
来源:互联网 发布:阿里云cdn流量包 编辑:程序博客网 时间:2024/05/19 22:27
这段时间我们在做一个触屏的软件,负责人提出要将menu的pan定时隐藏。
同事已经研究出来了,我就想偷懒,但是却发现,代码到我这根本不好使。试过很多种方法,但是,发现pan.top的值是固定的,一直不变,我就想既然这样不好使,或许,直接用height还能省很多事。
下面就是原码:
private void fCity_Load(object sender, EventArgs e)
{
//panButton伸缩
this.panBottom.Height = 72;//pan的高
this.timer1.Enabled = true;//时间控件
}
private void timer1_Tick(object sender, EventArgs e)
{
int x = Cursor.Position.X;//得到鼠标的x坐标
int y = Cursor.Position.Y;//得到鼠标的y坐标
if (this.panBottom.Height == 0) //弹出
{
if (y >= this.Bottom - 50 && x > this.panBottom.Left && x < this.panBottom.Left + this.panBottom.Width)
{
for (int i = 0; i <= 72; i++)
{
this.panBottom.Height = i;
}
this.timer1.Interval = 5000;
}
}
else //缩进
{
if (y < this.Bottom - 50)
{
if (y < this.Bottom - this.panBottom.Height || y < this.panBottom.Top || x < this.panBottom.Left || x > this.panBottom.Right - this.panBottom.Width)//判断鼠标X,Y是是否在窗体中,如果不在就缩窗体
{
for (int i = 72; i >= 0; i--)
{
this.panBottom.Height = i;
}
this.timer1.Interval = 100;
}
}
}
}
- 模仿视屏软件,定时将pan隐藏
- 定时锁屏软件
- Pan
- pan
- html页面模仿定时任务
- ios 模仿直播软件
- Java 模仿手机隐藏地址栏
- kettle执行定时任务,使用pan.bat和kitchen.bat
- CSplitterWnd扩展类实现隐藏/显示列Pan
- Jquery定时隐藏对话框
- 医疗软件Pan、Zoom、Rotation的实现原理
- 定时截屏软件1.0版
- 定时挡屏,提醒,报时软件
- 模仿qq屏幕四周隐藏窗体
- 黑客内参-使用恶意软件将隐藏代码注入已知进程的渗透研究
- mfc 窗口分割 CSplitterWnd扩展类实现隐藏/显示列Pan
- 定时自动关闭软件
- Linux定时软件Cron
- 皮肤的用法 (asp.net C#)
- ASP.net 页面被关闭后,服务器端是否仍然执行中?
- 电层的分割
- c++中NEW对象的一些测试
- cppunit::mfcui::testrunner无法启动图形界面
- 模仿视屏软件,定时将pan隐藏
- JAVA类文件版本(class version)与JDK对应关系
- 利用rename命令Linux批量重命名
- [转]session和cookie 的关系
- 很详细的Log4j配置
- 樱顶老图正在沦为公共厕所
- 使用DataView与Form Web Part实现列表的关键字查询
- NoSQL数据库探讨 -- 非关系型数据库
- test