TimeoutValue Property Example

After determining the current timeout value, this example prompts the user to set a new timeout.

Sub Main

 Dim Sys As Object


 Set Sys = CreateObject("EXTRA.System")


 ' These lines set up the strings to be used in the

 ' InputBox dialog

 InputPrompt$ = "The current timeout value is " _

  + CStr(Sys.TimeoutValue)

 InputPrompt$ = InputPrompt$ + " Enter a value to change it."

 Title$ = "Set Timeout Value"

 Default$ = Str$(Sys.TimeoutValue)


 NewTimeout$ = InputBox$(InputPrompt$, Title$, Default$)


 if NewTimeout$ <> "" then

  ' The TimeoutValue property is used to set the timeout value.

  Sys.TimeoutValue = Val(NewTimeout$)

   MsgBox "The new value is " + CStr(Sys.TimeoutValue) + "."

 end if

End Sub