C#如何实现视频监控分屏

Ghost_520 2009-08-04 05:54:45


如图想做类似的分屏 动态的分屏 1,4,9,16,25,36,这样的动态分屏
C# 急!!!!
...全文
2138 21 打赏 收藏 转发到动态 举报
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
有没有源码,发一份查考下,最近也要实现这个功能也!C# 邮箱lishan_liang@126.com
谢谢拉!
zst82 2011-11-16
  • 打赏
  • 举报
回复
感觉这样不很实用,有没有更实用的应用于工程的方法?
yu_fly 2011-08-08
  • 打赏
  • 举报
回复
不错,学习了!!
思嘉 2011-05-11
  • 打赏
  • 举报
回复
不错,参考一下
巨应打字员 2011-04-07
  • 打赏
  • 举报
回复
楼主发型很犀利啊
macrottian 2010-12-23
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 chenxiaoyan_123 的回复:]
谢谢哦。收藏着,以后会有用的!
[/Quote]+1
chenxiaoyan_123 2010-09-29
  • 打赏
  • 举报
回复
谢谢哦。收藏着,以后会有用的!
bellahao 2010-09-19
  • 打赏
  • 举报
回复
要是用winform 做呢?Point mypoint = new Point(rects[i].X, rects[i].Y);rects 指的是Rectangle这个??但是不能用啊
ygang2008 2010-07-05
  • 打赏
  • 举报
回复
不错,参考一下
chunfangphb 2009-11-11
  • 打赏
  • 举报
回复
如果让这些面板浮动呢
Ghost_520 2009-08-04
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 icanusethisid 的回复:]
C# code///<summary>/// 返回分割后的rectangle数组///</summary>///<param name="rt">待分割的矩形</param>///<param name="rowCount">行数</param>///<param name="colCount">列数</param>///<returns></returns>public Rectangle[] ¡­
[/Quote]

在这段代码里面加上
for (int i = 0; i < rowCount * colCount; i++)
{
Panel myPanel = new Panel();
myPanel.Name = "myPanel" + i.ToString();
Point mypoint = new Point(rects[i].X,rects[i].Y);
myPanel.Location = mypoint;
myPanel.Height = rects[i].Height;
myPanel.Width = rects[i].Width;
myPanel.BackColor = Color.Pink;
myPanel.BorderStyle = BorderStyle.FixedSingle;
this.panel1.Controls.Add(myPanel);
}
就可以实现动态分屏功能 在次谢谢ICanUseThisID
phf0313 2009-08-04
  • 打赏
  • 举报
回复
分屏啊?
监控倒是做过,但是分屏没有。

关注了。
Ghost_520 2009-08-04
  • 打赏
  • 举报
回复
谢谢ICanUseThisID
您的东西给了我很大的提示
Ghost_520 2009-08-04
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 wuyq11 的回复:]
分屏采用4个Panel,当放大时就分别隐藏其他Panel
参考

[/Quote]
那要是是36个难道就用36个panel 这样不好吧 而其挺累的
ICanUseThisID 2009-08-04
  • 打赏
  • 举报
回复

/// <summary>
/// 返回分割后的rectangle数组
/// </summary>
/// <param name="rt">待分割的矩形</param>
/// <param name="rowCount">行数</param>
/// <param name="colCount">列数</param>
/// <returns></returns>
public Rectangle[] GetSplittedRectangles(Rectangle rt, int rowCount,int colCount)
{
Rectangle[] rects = new Rectangle[rowCount * colCount];

int width = rt.Width / colCount;
int height = rt.Height / rowCount;

for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
{
for (int colIndex = 0; colIndex < colCount; colIndex++)
{
rects[rowIndex * colCount + colIndex] = new Rectangle(colIndex * width,
rowIndex * height, width, height);
}
}

return rects;
}
wuyq11 2009-08-04
  • 打赏
  • 举报
回复
分屏采用4个Panel,当放大时就分别隐藏其他Panel
参考
Ghost_520 2009-08-04
  • 打赏
  • 举报
回复
难道没人知道吗 我自己顶了
Ghost_520 2009-08-04
  • 打赏
  • 举报
回复
哎 就是晚上没有 哪个仁兄知道的帮个忙啊
hxl4534 2009-08-04
  • 打赏
  • 举报
回复
下班咯 楼上的难道是stone?
CeleryZeng 2009-08-04
  • 打赏
  • 举报
回复
网上应该有啊···下班之前来报道的··帮你顶

110,539

社区成员

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

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

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