110,536
社区成员
发帖
与我相关
我的任务
分享
int w = this.Width;
int h = this.Height;
if (w != 0)
{
GraphicsPath myPath = new GraphicsPath();
//左上角
myPath.AddArc(0, 0, 20, 20, 180, 90);
//上边
myPath.AddLine(10, 0, w - 10, 0);
//右上角
myPath.AddArc(w - 20, 0, 20, 20, 270, 90);
//右边
myPath.AddLine(w, 10, w, h - 10);
//右下角
myPath.AddArc(w - 20, h - 20, 20, 20, 0, 90);
//下边
myPath.AddLine(w - 10, h, 10, h);
//左下角
myPath.AddArc(0, Height - 20, 20, 20, 90, 90);
//左边
myPath.AddLine(0, h - 10, 0, 10);
//将窗体的显示区域设为GraphicsPath的实例
this.Region = new System.Drawing.Region(myPath); ;
}
[/quote]非常 感谢 我想问下 就是图片 旁边 有那种 阴影 是怎么弄出来的[/quote]
双层窗体-阴影作为一个窗体。用系统函数UpdateLayeredWindow来绘制,绘制方法可以参考
【C#界面】完美实现无毛边异形窗体(优化版)
双层窗体及UpdateLayeredWindow绘制的介绍贴吧
以上示例采用同样原理。[/quote]学习了有处理边角的例子吗 我想学学 [quote=引用 12 楼 wf5360308 的回复:] 不错,边角再处理得圆滑点就更好了,特别是右上角
int w = this.Width;
int h = this.Height;
if (w != 0)
{
GraphicsPath myPath = new GraphicsPath();
//左上角
myPath.AddArc(0, 0, 20, 20, 180, 90);
//上边
myPath.AddLine(10, 0, w - 10, 0);
//右上角
myPath.AddArc(w - 20, 0, 20, 20, 270, 90);
//右边
myPath.AddLine(w, 10, w, h - 10);
//右下角
myPath.AddArc(w - 20, h - 20, 20, 20, 0, 90);
//下边
myPath.AddLine(w - 10, h, 10, h);
//左下角
myPath.AddArc(0, Height - 20, 20, 20, 90, 90);
//左边
myPath.AddLine(0, h - 10, 0, 10);
//将窗体的显示区域设为GraphicsPath的实例
this.Region = new System.Drawing.Region(myPath); ;
}
[/quote]非常 感谢 我想问下 就是图片 旁边 有那种 阴影 是怎么弄出来的原来好多人都写了 而且比你的好很多..也提供0分源码下载.. 我感觉你好像从别人哪直接拿过来 自己改几下呢? http://download.csdn.net/detail/lyx_520/5312049
原来好多人都写了 而且比你的好很多..也提供0分源码下载.. 我感觉你好像从别人哪直接拿过来 自己改几下呢? http://download.csdn.net/detail/lyx_520/5312049
= =..弱弱的说一句。你看的那个是不是我的。想学习技术可以加我QQ:345015918 高仿QQ2013通讯DEMO-10.30更新-点击下载 [精仿]360安全卫士-10.30更新(CSkin Demo)-点击下载
有处理边角的例子吗 我想学学 [quote=引用 14 楼 xzh1995 的回复:] [quote=引用 12 楼 wf5360308 的回复:] 不错,边角再处理得圆滑点就更好了,特别是右上角
int w = this.Width;
int h = this.Height;
if (w != 0)
{
GraphicsPath myPath = new GraphicsPath();
//左上角
myPath.AddArc(0, 0, 20, 20, 180, 90);
//上边
myPath.AddLine(10, 0, w - 10, 0);
//右上角
myPath.AddArc(w - 20, 0, 20, 20, 270, 90);
//右边
myPath.AddLine(w, 10, w, h - 10);
//右下角
myPath.AddArc(w - 20, h - 20, 20, 20, 0, 90);
//下边
myPath.AddLine(w - 10, h, 10, h);
//左下角
myPath.AddArc(0, Height - 20, 20, 20, 90, 90);
//左边
myPath.AddLine(0, h - 10, 0, 10);
//将窗体的显示区域设为GraphicsPath的实例
this.Region = new System.Drawing.Region(myPath); ;
}
[/quote]非常 感谢 我想问下 就是图片 旁边 有那种 阴影 是怎么弄出来的[/quote]
双层窗体-阴影作为一个窗体。用系统函数UpdateLayeredWindow来绘制,绘制方法可以参考
【C#界面】完美实现无毛边异形窗体(优化版)
双层窗体及UpdateLayeredWindow绘制的介绍贴吧
以上示例采用同样原理。云的动画可以不用flash的,直接用序列图像做。
有处理边角的例子吗 我想学学 不错,边角再处理得圆滑点就更好了,特别是右上角
int w = this.Width;
int h = this.Height;
if (w != 0)
{
GraphicsPath myPath = new GraphicsPath();
//左上角
myPath.AddArc(0, 0, 20, 20, 180, 90);
//上边
myPath.AddLine(10, 0, w - 10, 0);
//右上角
myPath.AddArc(w - 20, 0, 20, 20, 270, 90);
//右边
myPath.AddLine(w, 10, w, h - 10);
//右下角
myPath.AddArc(w - 20, h - 20, 20, 20, 0, 90);
//下边
myPath.AddLine(w - 10, h, 10, h);
//左下角
myPath.AddArc(0, Height - 20, 20, 20, 90, 90);
//左边
myPath.AddLine(0, h - 10, 0, 10);
//将窗体的显示区域设为GraphicsPath的实例
this.Region = new System.Drawing.Region(myPath); ;
}
不错,边角再处理得圆滑点就更好了,特别是右上角
界面很漂亮,模仿的挺像,但是你的随机白云飘动呢,你的配置翻滚呢,你的下拉列表呢,你的小键盘呢,你的二维码呢…… 功能都没有呢。 QQ的登录界面里面学问不小,用WINFORM实现有点困难。
加油
测试了下 边框有点不尽人意 呀
界面看着挺不错的,要是界面上在丰富点就更不错了,啥都点不了