How do I use the AdvancedSettings3 parameters ?

  • Thread starter Thread starter Nico Lepe
  • Start date Start date
N

Nico Lepe

Hi,

I have the following function that I use to connect to a remote
server; it works fine and there is no problems in it...

But now I want to hide the minimize button in the remote session
window. So I've added this line in my code:

MsRdpClient.AdvancedSettings3.ConnectionBarShowMinimizeButton= FALSE

But I receive a Javascript error: Property or Method not supported by
the object.

Wher am I wrong ?

Many thanks,
Nick.


sub BtnConnect
Dim serverName
'server
if not Document.all.Server.value = "" then
serverName = Document.all.Server.value
else
serverName = Document.location.hostname
end if

serverName = trim(serverName)

MsRdpClient.server = serverName

'serverName name text
Document.all.srvNameField.innerHtml = serverName

'Username/Domain
MsRdpClient.UserName = Document.all.UserName.Value
MsRdpClient.Domain = Document.all.Domain.Value
MsRdpClient.AdvancedSettings2.ClearTextPassword = "pluto"

'Resolution
MsRdpClient.FullScreen = FALSE
select case document.all.comboResolution.value
case "1"
MsRdpClient.FullScreen = TRUE
resWidth = screen.width
resHeight = screen.height
case "2"
resWidth = "640"
resHeight = "480"
case "3"
resWidth = "800"
resHeight = "600"
case "4"
resWidth = "1024"
resHeight = "768"
case "5"
resWidth = "1280"
resHeight = "1024"
case "6"
resWidth = "1600"
resHeight = "1200"
end select
MsRdpClient.DesktopWidth = resWidth
MsRdpClient.DesktopHeight = resHeight

MsRdpClient.Width = resWidth
MsRdpClient.Height = resHeight

sStartProgram = Document.all.StartProgram.value

if sStartProgram <> "" then
MsRdpClient.SecuredSettings.StartProgram = sStartProgram
end if

'Device redirection options
MsRdpClient.AdvancedSettings2.RedirectDrives = FALSE
MsRdpClient.AdvancedSettings2.RedirectPrinters = TRUE
MsRdpClient.AdvancedSettings2.RedirectPorts = FALSE
MsRdpClient.AdvancedSettings2.RedirectSmartCards = FALSE
MsRdpClient.AdvancedSettings3.ConnectionBarShowMinimizeButton=
FALSE

'FullScreen title
MsRdpClient.FullScreenTitle = L_FullScreenTitle_Text & "(" &
serverName & ")"

'Display connect region
Document.all.loginArea.style.display = "none"
Document.all.connectArea.style.display = "block"

'Connect
MsRdpClient.Connect
end sub
 
Silly as it sounds, you need to use the MsRdpClient.AdvancedSettings4
object to get at the IMsRdpClientAdvancedSettings3 interface. That
is, rewrite the line:

sRdpClient.AdvancedSettings4.ConnectionBarShowMinimizeButton= FALSE

Hi,

I have the following function that I use to connect to a remote
server; it works fine and there is no problems in it...

But now I want to hide the minimize button in the remote session
window. So I've added this line in my code:

MsRdpClient.AdvancedSettings3.ConnectionBarShowMinimizeButton= FALSE

But I receive a Javascript error: Property or Method not supported by
the object.

Wher am I wrong ?

Many thanks,
Nick.


sub BtnConnect
Dim serverName
'server
if not Document.all.Server.value = "" then
serverName = Document.all.Server.value
else
serverName = Document.location.hostname
end if

serverName = trim(serverName)

MsRdpClient.server = serverName

'serverName name text
Document.all.srvNameField.innerHtml = serverName

'Username/Domain
MsRdpClient.UserName = Document.all.UserName.Value
MsRdpClient.Domain = Document.all.Domain.Value
MsRdpClient.AdvancedSettings2.ClearTextPassword = "pluto"

'Resolution
MsRdpClient.FullScreen = FALSE
select case document.all.comboResolution.value
case "1"
MsRdpClient.FullScreen = TRUE
resWidth = screen.width
resHeight = screen.height
case "2"
resWidth = "640"
resHeight = "480"
case "3"
resWidth = "800"
resHeight = "600"
case "4"
resWidth = "1024"
resHeight = "768"
case "5"
resWidth = "1280"
resHeight = "1024"
case "6"
resWidth = "1600"
resHeight = "1200"
end select
MsRdpClient.DesktopWidth = resWidth
MsRdpClient.DesktopHeight = resHeight

MsRdpClient.Width = resWidth
MsRdpClient.Height = resHeight

sStartProgram = Document.all.StartProgram.value

if sStartProgram <> "" then
MsRdpClient.SecuredSettings.StartProgram = sStartProgram
end if

'Device redirection options
MsRdpClient.AdvancedSettings2.RedirectDrives = FALSE
MsRdpClient.AdvancedSettings2.RedirectPrinters = TRUE
MsRdpClient.AdvancedSettings2.RedirectPorts = FALSE
MsRdpClient.AdvancedSettings2.RedirectSmartCards = FALSE
MsRdpClient.AdvancedSettings3.ConnectionBarShowMinimizeButton=
FALSE

'FullScreen title
MsRdpClient.FullScreenTitle = L_FullScreenTitle_Text & "(" &
serverName & ")"

'Display connect region
Document.all.loginArea.style.display = "none"
Document.all.connectArea.style.display = "block"

'Connect
MsRdpClient.Connect
end sub

This posting is provided "AS IS" with no warranties, and confers no rights
 
Hi Ivan,

I've changed my code as stated by you but, still, I'm getting the same
error: Property or Method not supported by the object.

I'm using Windows XP professional trying to connect to another Windows
XP professional both in Italian.

Can you please send me a little example (even using a different
method) that allows me to disable the minimize button. Like this one
that I've used for the FullScreen:

function MsRdpClient_OnLeaveFullScreenMode()
MsRdpClient.FullScreen = TRUE
end function

Many thanks,
Nick.
 
What version of the TS control are you using? If you update to the
latest from:
http://www.microsoft.com/downloads/...b5-97ff-47bc-bacc-92283b52b310&DisplayLang=en

Does this solve your issue?

Hi Ivan,

I've changed my code as stated by you but, still, I'm getting the same
error: Property or Method not supported by the object.

I'm using Windows XP professional trying to connect to another Windows
XP professional both in Italian.

Can you please send me a little example (even using a different
method) that allows me to disable the minimize button. Like this one
that I've used for the FullScreen:

function MsRdpClient_OnLeaveFullScreenMode()
MsRdpClient.FullScreen = TRUE
end function

Many thanks,
Nick.

This posting is provided "AS IS" with no warranties, and confers no rights
 
Dear Ivan,
What version of the TS control are you using? If you update to the
latest from:
http://www.microsoft.com/downloads/...b5-97ff-47bc-bacc-92283b52b310&DisplayLang=en

Does this solve your issue?

I've downloaded and installed the last version of the file you
suggested on the webserver, the client and the remote PC but I'm
still getting the same old error in this line:

sRdpClient.AdvancedSettings4.ConnectionBarShowMinimizeButton= FALSE


Are there another way to intercept the minimize event and cancel it ?

Many thanks,
Nick.
 
Back
Top