双屏显示的问题···

xiven 2009-11-03 05:39:38
要求双屏显示效果为:扩展屏 显示 主屏中界面程序的一部分。比如说一个管理系统,在主屏上 显示后台和前台的信息,而在扩展屏上就只显示主屏上的 前台信息。

我想的2个方案:
1,COPY主屏 的一部分,把COPY的部分显示到扩展屏 上。 该怎么设置COPY的部分并把他放到分屏上?或有这样的软件 控制的吗?
2,主屏上管理程序界面与扩展屏上的 不一样,但是扩展屏上显示的信息和主屏同步。 这就要关系到:1,另外要设计扩展屏上的界面,2,控制扩展屏的显示?

我想到实现的方法就是上面2个方案,方案的实现方法却不知道,请教怎么实现或给个更好的方法。3Q
...全文
183 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
真相重于对错 2009-11-04
  • 打赏
  • 举报
回复
多显示器api
EnumDisplayMonitors This function enumerates screens that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a specified device context. //获取所有显示器
GetMonitorInfo This function retrieves information about a screen. //获取显示器信息,这个函数比较重要,包括显示器所在的rect ,是否为主显

MonitorFromPoint This function retrieves a handle to the screen that contains a specified point. //获取输入点所在的显示器
MonitorFromRect This function retrieves a handle to the screen that has the largest area of intersection with a specified rectangle. //获取输入rect所在的显示器

剩下的就是你如何灵活应用了

具体用法查msdn

MonitorFromWindow This function retrieves a handle to the screen that has the largest area of intersection with the bounding rectangle of a specified window.

wuyq11 2009-11-03
  • 打赏
  • 举报
回复
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;
}

threenewbee 2009-11-03
  • 打赏
  • 举报
回复
Windows支持多显示器。
把窗口移到第二个桌面就行了。
xiven 2009-11-03
  • 打赏
  • 举报
回复
顶1

110,534

社区成员

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

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

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