CodeProject有一篇文章介绍了怎么实现一个SlideForm,非常不错,收藏在此.
http://www.codeproject.com/KB/dialog/csslideform.aspx
使用方法很简单,引用SlideForm.dll,然后添加一个Form修改它从 SlideDialog.SlideDialog继承
public class MySlideForm : SlideDialog.SlideDialog
并重新实现构造函数,调用父类的构造函数,传入参数:
public MySlideForm(Form poOwner, float pfStep) : base(poOwner, pfStep)
{
InitializeComponent();
}
{
InitializeComponent();
}
这样就实现了一个SlideForm,接着就是使用这个SlideForm了
MySlideForm _oSlideForm;
_oSlideForm = new MySlideForm(this, 0.1f);
_oSlideForm.SlideDirection = SlideDialog.SlideDialog.SLIDE_DIRECTION.RIGHT;
_oSlideForm.Slide();
_oSlideForm = new MySlideForm(this, 0.1f);
_oSlideForm.SlideDirection = SlideDialog.SlideDialog.SLIDE_DIRECTION.RIGHT;
_oSlideForm.Slide();
看看代码就一清二楚了,使用很方便。