如何在窗体弹出效果上给按钮? [英] How to give buttons on form Popout Effect?

查看:56
本文介绍了如何在窗体弹出效果上给按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在一个Windows API代码包中看到了一个示例程序,该程序在左侧显示了几个按钮.将鼠标移到该按钮上时,整个按钮会弹出并变大,然后从该按钮上取下鼠标后,它将恢复为正常大小.就我想添加的滚动效果和动画而言,它有点像Mac OSX工具栏.有没有人看过这个例子,知道在哪里找到它?还是可以指出正确的方向从哪里开始?

I have seen an example program in maybe one of the Windows API Code packs that shows several buttons on the left hand side. When the mouse is brought over the button, the entire button pops out and becomes larger to then go back to normal size when the mouse is taken off the button. It is kind of like Mac OSX toolbar in the sense of the scroll effect and animation that I would like to add. Has anyone seen this example, Know where to find it? or can point me in the right direction as where to start?

推荐答案

设置您的位置

set your location

private void button1_MouseEnter(object sender, EventArgs e)
       {
           button1.Location = new Point(82, 202);
           button1.Size = new Size(79, 28);
       }

       private void button1_MouseLeave(object sender, EventArgs e)
       {
           button1.Location = new Point(84, 206);
           button1.Size = new Size(75, 23);
       }


这篇关于如何在窗体弹出效果上给按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆