autoIT可调整大小的终端服务 [英] autoIT resizable terminal service
本文介绍了autoIT可调整大小的终端服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我调整终端服务器"的大小时,我希望"RDP会话"遵循大小调整而不会出现灰色边框
When I resize "Terminal server", I want that the "RDP session" follow the resizing without grey borders appear
有人可以帮助我吗?
谢谢
我有以下代码:
$host = "" ;<<<<<<< enter here the host name or ip address
$hGUI = GUICreate("Terminal server", 900, 700, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_THICKFRAME))
$oRDP = ObjCreate("MsTscAx.MsTscAx.2")
$oRDP_Ctrl = GUICtrlCreateObj($oRDP, 0, 0, 900, 700)
GUICtrlSetResizing(-1,GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKWID TH+$GUI_DOCKHEIGHT) GUICtrlSetStyle($oRDP_Ctrl , $WS_VISIBLE)
$oRDP.DesktopWidth = 900
$oRDP.DesktopHeight = 700
$oRDP.Fullscreen = False
$oRDP.ColorDepth = 16
$oRDP.AdvancedSettings3.SmartSizing = True
$oRDP.Server = $host
$oRDP.UserName = "" ;<<<<<<< enter here the user name
$oRDP.Domain = ""
$oRDP.AdvancedSettings2.ClearTextPassword = ""
$oRDP.ConnectingText = "Connecting to " & $host
$oRDP.DisconnectedText = "Disconnected from " & $host
$oRDP.StartConnected = True
$oRDP.Connect()
GUISetState(@SW_SHOW, $hGUI)
$oShel = ObjCreate("shell.application")
$oShel_Ctrl = GUICtrlCreateObj($oShel, 0, 0, 900, 700)
GUICtrlSetStyle($oShel_Ctrl , $WS_VISIBLE)
Send("#r")
Send ("C:\Program Files (x86)\scripts\PSTools\******.bat")
Send("{ENTER}")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
$oRDP.Disconnect()
Exit
EndSwitch
WEnd
推荐答案
您只需要:
$hGUI = GUICreate("Terminal server", 900, 700, -1, -1, $WS_POPUP)
如果您要尝试使其完全没有边界,那么$WS_POPUP
是您想要使用的,完全与上面相同.很抱歉,您的英语不好,很抱歉.
If you are trying to make it so there is absolutely NO borders, then the $WS_POPUP
is what you want to use, exactly as above. It's very hard to understand your broken english, my apologies.
这篇关于autoIT可调整大小的终端服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文