问题描述
Im使用axMsRDPClient7NotSafeForScripting并连接到RemoteApp或"RemoteProgram.RemoteProgramMode = true"中的Windows 2008 R2服务器.一切正常,但应用程序在屏幕中央打开,直到出现问题为止 是多显示器. 当有多个监视器时,remoteapp将在两个屏幕的中央打开.
Im using axMsRDPClient7NotSafeForScripting and connecting to windows 2008 r2 server in RemoteApp or "RemoteProgram.RemoteProgramMode = true". Everything opens fine, but the applications are opening in the center of screen which is fine until there is multi monitors. When there is multiple monitors the remoteapp opens in the center of the two screens.
我能够在一个屏幕或另一个屏幕上最大化一个应用程序,看起来它可以理解每个监视器的高度x,但是如果该应用程序具有子窗体,则它将在两个屏幕的中央打开.
I am able to maximize an application on one screen or another and it appears it understands the h x w of each monitor, but if the application has a child form it opens in the center of both screens.
如果我使用mstsc.exe v6,7等并与基本remoteapp连接,则应用程序将更加了解双监视器并按主要打开的应用程序的比例处理子窗体等.我相信这是由于在rdp文件中设置了不同的参数, 例如:
If I utilize mstsc.exe v6,7 etc and connect with basic remoteapp the applications are more aware of dual monitors and handle child forms etc in proportion to the main open app. I believe this is due to setting different parameters in the rdp file, such as:
使用multimon:i:1
use multimon:i:1
屏幕模式ID:i:1
screen mode id:i:1
span monitors:i:1
span monitors:i:1
我无法在我的C#应用程序的mstsclib控件上找到激活这些设置的方法.我可以获得控件来识别Desktop W&的唯一方法. H设置为:
I am unable to find a way to activate these settings on my mstsclib control on my c# application. The only way I can get the control to recognize the Desktop W & H is to set:
rdpClient.DesktopWidth = SystemInformation.VirtualScreen.Width;
rdpClient.DesktopHeight = SystemInformation.VirtualScreen.Height;
rdpClient.DesktopWidth = SystemInformation.VirtualScreen.Width;
rdpClient.DesktopHeight = SystemInformation.VirtualScreen.Height;
连接时. 的确设置了远程桌面以在多台监视器上扩展,但是正如您期望的那样,它将会话上的桌面W/H视为一个大屏幕.
On connecting. This does set the remote desktop to expand over the multiple monitors, but as you would expect it is treating the Desktop W/H on the session as one big screen.
推荐答案
在我看来,您的案件似乎不适用于CLR论坛.
Your case seems not appropriate in CLR forum in my mind.
无论如何,如果您使用的是WinForm,我想您可以参考Screen Class来完成设置工作:
Anyway, if you are using WinForm, I think you can refer to the Screen Class in order to finish your setting job:
您将可以使用此类来识别应用程序所在的屏幕.
You will be able to use this class to identfy the screen where the application is.
最诚挚的问候,
这篇关于MSTSCLib RemoteApp启动的应用程序/子窗体在多个屏幕中间打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!