请教大佬:用winform做出像快递查询一样的那种界面

CNCaiNiao 2019-10-30 02:43:17
快递查询 带图片的或者是显示进度的控件,看着很舒服,但是都是BS看的多,winform有没有呢,要怎么实现,尤其是颜色跟图片是动态着色的,感觉好痴迷
...全文
223 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
CNCaiNiao 2019-11-01
  • 打赏
  • 举报
回复
void drawStep(Panel panel1) { int[] rowHeights = new int[] { 100, 200, 80, 40 }; ///直径 int rectLenth = 20; Graphics graphics = panel1.CreateGraphics(); graphics.SmoothingMode = SmoothingMode.AntiAlias; //使绘图质量最高,即消除锯齿 graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.CompositingQuality = CompositingQuality.HighQuality; int lenTotal = 0; //绘制中线 graphics.Clear(Color.LightYellow); Color c = new Color(); c = Color.Black; for (int i = 0; i < rowHeights.Length; i++) { int rowHeight = rowHeights[i]; lenTotal += rowHeight; int x1 = panel1.Width / 2; int y1 = 0; int x2 = x1; int y2 = rowHeight; int rectX = x1 - rectLenth / 2; int rectsemi = rectLenth / 2; int rectY = rowHeight / 2 - rectLenth / 2; if (i == 0) { c = Color.Red; } else { y1 = lenTotal - rowHeight; y2 = lenTotal; c = Color.Black; rectY = y1 + rowHeights[i] / 2 - rectsemi; } graphics.DrawLine(new Pen(c, 5), x1, y1, x2, y2); graphics.FillEllipse(new SolidBrush(c), new Rectangle(new Point(rectX, rectY), new Size(rectLenth, rectLenth))); } }
desperaso 2019-10-30
  • 打赏
  • 举报
回复
就一堆图片,没啥含量,都是一些基本的操作,参考着改改,还能用
https://www.haolizi.net/example/view_14426.html

正怒月神 2019-10-30
  • 打赏
  • 举报
回复
winform里进度条好像是 progressbar 但是有点丑 要其他的,那你试试第三方控件, 如果自己做的话,也可以,但是要做的好看有点麻烦。

111,125

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧