手上要做一个视屏监控界面控制,功能要求:标准九宫格,视屏切换,拖拽切换使用tableLayoutPanel,用户控件CameraDrive(该控件上动态加载相关的视屏监控控件)在tableLayoutPanel上动态加载CameraDrive问题来了,如何把当前的操作传递给CameraDrive而不是CameraDrive上覆盖的控件?例:点击事件
当鼠标点击tableLayoutPanel上的单元格中的CameraDrive,获取点击的是CameraDrive上覆盖的控件(该覆盖的控件无点击事件),如何让CameraDrive获取该点击事件
当鼠标点击tableLayoutPanel上的单元格中的CameraDrive,获取点击的是CameraDrive上覆盖的控件(该覆盖的控件无点击事件),如何让CameraDrive获取该点击事件
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;
}