autoIT resizable terminal service

会有一股神秘感。 提交于 2019-12-12 02:57:11

问题


When I resize "Terminal server", I want that the "RDP session" follow the resizing without grey borders appear

Anybody can help me?

Thanks

I have the following code:

$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

回答1:


You really only need:

$hGUI = GUICreate("Terminal server", 900, 700, -1, -1, $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.



来源:https://stackoverflow.com/questions/24775735/autoit-resizable-terminal-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!