C# winform实现右下角弹出窗口结果的方法
using System.Runtime.InteropServices;
[DllImport("user32")]
private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags);
//下面是可用的常量,按照不合的动画结果声明本身须要的
private const int AW_HOR_POSITIVE = 0 x0001;//自左向右显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记
private const int AW_HOR_NEGATIVE = 0 x0002;//自右向左显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记
private const int AW_VER_POSITIVE = 0 x0004;//自顶向下显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记
private const int AW_VER_NEGATIVE = 0 x0008;//自下向上显示窗口,该标记可以在迁移转变动画和滑动动画中应用。应用AW_CENTER标记时忽视该标记该标记
private const int AW_CENTER = 0 x0010;//若应用了AW_HIDE标记,则使窗口向内重叠;不然向外扩大
private const int AW_HIDE = 0 x10000;//隐蔽窗口
private const int AW_ACTIVE = 0 x20000;//激活窗口,在应用了AW_HIDE标记后不要应用这个标记
private const int AW_SLIDE = 0 x40000;//应用滑动类型动画结果,默认为迁移转变动画类型,当应用AW_CENTER标记时,这个标记就被忽视
private const int AW_BLEND = 0 x80000;//应用淡入淡出结果
private void Form1_Load(object sender, EventArgs e)
{
int x = Screen.PrimaryScreen.WorkingArea.Right - this.Width;
int y = Screen.PrimaryScreen.WorkingArea.Bottom - this.Height;
this.Location = new Point(x, y);//设置窗体在屏幕右下角显示
AnimateWindow(this.Handle, 1000, AW_SLIDE | AW_ACTIVE | AW_VER_NEGATIVE);
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
AnimateWindow(this.Handle, 1000, AW_BLEND | AW_HIDE);
}
复制代码(编辑:雷林鹏 来源:网络)
C# winform实现右下角弹出窗口结果的方法的更多相关文章
- Jquery--仿制360右下角弹出窗口
原文:Jquery--仿制360右下角弹出窗口 先发浏览器效果图,给大家看. 要实现这样的效果,按照思路,第一步,写好CSS布局,将图片放到浏览器右下角的位置 CSS代码很灵活,我写的只是简单的一种而 ...
- c# 右下角弹出窗口
public partial class Form2 : Form { System.Diagnostics.Stopwatch sth = new System.Diagnostics.Stopwa ...
- C# winform 右下角弹出窗口结果
using System.Runtime.InteropServices; [DllImport("user32")] private static extern bool Ani ...
- C#实现右下角弹出窗口效果
/// <summary> /// 窗体动画函数 注意:要引用System.Runtime.InteropServices; /// </summary> /// <pa ...
- C# 在右下角弹出窗口
窗口代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Da ...
- JavaScript实现网页右下角弹出窗口代码
<script language="JavaScript"><!--var no = 50;var speed = 1;var ns4up = (document ...
- jQuery插件(右下角弹出窗口)
原文发布时间为:2010-03-07 -- 来源于本人的百度文章 [由搬家工具导入] jQuery插件(右下角弹出窗口) 收藏 源码下载 http://download.csdn.net/source ...
- 在HTML网页中设置弹出窗口的办法
[1.最基本的弹出窗口代码] 其实代码非常简单: <SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.h ...
- window.open()弹出窗口防止被禁
window.open(),顾名思义,是指在当前浏览器窗口弹出另一个浏览器窗口. 因为多种原因,浏览对window.open弹出的窗口做了多方限制.限制不同,肯定会造成各浏览器弹出窗口的差异. 大部分 ...
随机推荐
- VMware Authorization Service 未运行怎么解决
操作步骤如下: 1.按win+r快捷键,输入services.msc,点击确定: 2.服务列表找到VMware Authorization Service 并双击: 3.修改启动类型为自动,点击应用, ...
- 170621、springboot编程之全局异常捕获
1.创建GlobalExceptionHandler.java,在类上注解@ControllerAdvice,在方法上注解@ExceptionHandler(value = Exception.cla ...
- 170512、java日志文件log4j.properties配置详解
一.Log4j配置 第一步:加入log4j-1.2.8.jar到lib下. 第二步:在CLASSPATH下建立log4j.properties.内容如下: 放在src下的话就不用配置 否则得去web. ...
- Sublime Text 2/3 安装Emmet(Zencoding)以及常见使用,一种快速编写HTML/CSS代码的方法
原文链接http://blog.csdn.net/shirley254/article/details/52336744
- Code Forces 149DColoring Brackets(区间DP)
Coloring Brackets time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- Python爬虫基础(三)urllib2库的高级使用
Handler处理器 和 自定义Opener opener是 urllib2.OpenerDirector 的实例,其中urlopen是模块默认构建的opener. 但是基本的urlopen()方法不 ...
- 使用celery之了解celery(转)
原文 http://www.dongwm.com/archives/shi-yong-celeryzhi-liao-jie-celery/ 前言 我想很多做开发和运维的都会涉及一件事:cront ...
- python采用pika库使用rabbitmq总结,多篇笔记和示例(转)
add by zhj:作者的几篇文章参考了Rabbitmq的Tutorials中的几篇文章. 原文:http://www.01happy.com/python-pika-rabbitmq-summar ...
- [LeetCode] 83. Remove Duplicates from Sorted List_Easy tag: Linked List
Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1 ...
- java之标记型接口Cloneable
1.克隆用途. Cloneable和Serializable一样都是标记型接口,它们内部都没有方法和属性,implements Cloneable表示该对象能被克隆,能使用Object.clone() ...