The CxRsmCtl object contains the following methods:
The Configure method launches a Properties dialog box for the connected RSM service.
Configure()
Example
The following example calls Configure() on the CxHmiRsm object if a Site.Service is specified. This example is taken from CxHmiRsm Example.
|
Sub btnConfigure_EventClick() Dim This : Set This = btnConfigure If CxHmiRsm.SiteService <> "" Then CxHmiRsm.Configure Else MsgBox "No RSM service selected." End If End Sub |
The Delete method prompts the user to delete the selected service(s) if the delete function is enabled.
Delete()
Example
The following example deletes the selected service if delete is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnDelete_EventClick() Dim This : Set This = btnDelete If CxHmiRsm.DeleteEnabled() Then CxHmiRsm.Delete Else Dim strMsg strMsg = "'Delete' is not enabled for one or more of the selected services." strMsg = strMsg + " No selected services can be running, starting," strMsg = strMsg + " stopping, or failed." MsgBox strMsg End If End Sub |
The DeleteEnabled method returns true if the delete function is enabled for the selected service(s).
DeleteEnabled() As Boolean
This method checks the service info items of all of the selected services. If any one of the selected services is currently running, starting, stopping, or failed, this method will return false.
Example
The following example deletes the selected service if delete is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnDelete_EventClick() Dim This : Set This = btnDelete If CxHmiRsm.DeleteEnabled() Then CxHmiRsm.Delete Else Dim strMsg strMsg = "'Delete' is not enabled for one or more of the selected services." strMsg = strMsg + " No selected services can be running, starting," strMsg = strMsg + " stopping, or failed." MsgBox strMsg End If End Sub |
The Kill method prompts the user to kill the selected service(s) if the kill function is enabled.
Kill()
Example
The following example kills the selected service if kill is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnKill_EventClick() Dim This : Set This = btnKill If CxHmiRsm.KillEnabled() Then CxHmiRsm.Kill Else strMsg = "'Kill' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either running," strMsg = strMsg + " starting, stopping, or failed." MsgBox strMsg End If End Sub |
The KillEnabled method returns true if the kill function is enabled for the selected service(s).
KillEnabled() As Boolean
This method checks the service info items of all of the selected services. If any one of the selected services is not currently running, starting, stopping, or failed, this method will return false.
Example
The following example kills the selected service if kill is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnKill_EventClick() Dim This : Set This = btnKill If CxHmiRsm.KillEnabled() Then CxHmiRsm.Kill Else strMsg = "'Kill' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either running," strMsg = strMsg + " starting, stopping, or failed." MsgBox strMsg End If End Sub |
The New method launches a New RSM Entry dialog box for the connected RSM service.
New()
Example
The following example calls New() on the CxHmiRsm object if a Site.Service is specified. This example is taken from CxHmiRsm Example.
|
Sub btnNew_EventClick() Dim This : Set This = btnNew If CxHmiRsm.SiteService <> "" Then CxHmiRsm.New Else MsgBox "No RSM service selected." End If End Sub |
The Properties method invokes a Properties dialog box for the selected service(s) if the properties function is enabled.
Properties()
Example
The following example shows the properties for the selected service if the properties function is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnProperties_EventClick() Dim This : Set This = btnProperties If CxHmiRsm.PropertiesEnabled() Then CxHmiRsm.Properties Else strMsg = "'Properties' is only enabled when exactly one service is selected." MsgBox strMsg End If End Sub |
The PropertiesEnabled method returns true if the properties function is enabled for the selected service(s).
PropertiesEnabled() As Boolean
This method will always return true if exactly one service in the list is selected.
Example
The following example shows the properties for the selected service if the properties function is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnProperties_EventClick() Dim This : Set This = btnProperties If CxHmiRsm.PropertiesEnabled() Then CxHmiRsm.Properties Else strMsg = "'Properties' is only enabled when exactly one service is selected." MsgBox strMsg End If End Sub |
The Refresh method refreshes the list of services for the connected RSM service.
Refresh()
Example
The following example calls Refresh() on the CxHmiRsm object if a Site.Service is specified. This example is taken from CxHmiRsm Example.
|
Sub btnRefresh_EventClick() Dim This : Set This = btnRefresh If CxHmiRsm.SiteService <> "" Then CxHmiRsm.Refresh Else MsgBox "No RSM service selected." End If End Sub |
The Restart method prompts the user to restart the selected service(s) if the restart function is enabled.
Restart()
Example
The following example restarts the selected service if restart is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnRestart_EventClick() Dim This : Set This = btnRestart If CxHmiRsm.RestartEnabled() Then CxHmiRsm.Restart Else strMsg = "'Restart' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either running, defined," strMsg = strMsg + " stopped, misconfigured, or stopped during startup." MsgBox strMsg End If End Sub |
The RestartEnabled method returns true if the restart function is enabled for the selected service(s).
RestartEnabled() As Boolean
This method checks the service info items of all of the selected services. If any one of the selected services is not currently running, defined, stopped, misconfigured, or stopped during startup, this method will return false.
Example
The following example restarts the selected service if restart is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnRestart_EventClick() Dim This : Set This = btnRestart If CxHmiRsm.RestartEnabled() Then CxHmiRsm.Restart Else strMsg = "'Restart' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either running, defined," strMsg = strMsg + " stopped, misconfigured, or stopped during startup." MsgBox strMsg End If End Sub |
The Start method prompts the user to start the selected service(s) if the start function is enabled.
Start()
Example
The following example starts the selected service if start is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnStart_EventClick() Dim This : Set This = btnStart If CxHmiRsm.StartEnabled() Then CxHmiRsm.Start Else strMsg = "'Start' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either defined," strMsg = strMsg + " stopped, misconfigured, or stopped during startup." MsgBox strMsg End If End Sub |
The StartEnabled method returns true if the start function is enabled for the selected service(s).
StartEnabled() As Boolean
This method checks the service info items of all of the selected services. If any one of the selected services is not currently defined, stopped, misconfigured, or stopped during startup, this method will return false.
Example
The following example starts the selected service if start is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnStart_EventClick() Dim This : Set This = btnStart If CxHmiRsm.StartEnabled() Then CxHmiRsm.Start Else strMsg = "'Start' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either defined," strMsg = strMsg + " stopped, misconfigured, or stopped during startup." MsgBox strMsg End If End Sub |
The Stop method prompts the user to stop the selected service(s) if the stop function is enabled.
Stop()
Example
The following example stops the selected service if stop is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnStop_EventClick() Dim This : Set This = btnStop If CxHmiRsm.StopEnabled() Then CxHmiRsm.Stop Else strMsg = "'Stop' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either running" strMsg = strMsg + " or stopped during startup." MsgBox strMsg End If End Sub |
The StopEnabled method returns true if the stop function is enabled for the selected service(s).
StopEnabled() As Boolean
This method checks the service info items of all of the selected services. If any one of the selected services is not currently running or stopped during startup, this method will return false.
Example
The following example stops the selected service if stop is enabled for that service. This example is taken from CxHmiRsm Example.
|
Sub btnStop_EventClick() Dim This : Set This = btnStop If CxHmiRsm.StopEnabled() Then CxHmiRsm.Stop Else strMsg = "'Stop' is not enabled for one or more of the selected services." strMsg = strMsg + " All selected services must be either running" strMsg = strMsg + " or stopped during startup." MsgBox strMsg End If End Sub |