autoIT resizable terminal service

2019-09-16 19:38发布

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条回答
淡お忘
2楼-- · 2019-09-16 20:16

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.

查看更多
登录 后发表回答