ShowTrendAnalysis

<< Click to Display Table of Contents >>

 

ShowTrendAnalysis

ShowTrendAnalysis([Title], [Left], [Top], [Configuration], [ConfigStatus], [ErrorDetails])

Shows a TrendAnalysis window. This method returns True if this window was correctly shown or False in case of error. This method's parameters are listed on the next table.

Parameters of the ShowTrendAnalysis method

Parameter

Description

Title

Determines a window title. Corresponds to TrendAnalysis object's Title property. If omitted or informed an empty String, this window's title is configured as "TrendAnalysis"

Left

Window's horizontal coordinate, in pixels. Please check TrendAnalysis object's SetWindowPlacement method for more information about the behavior of this parameter, if omitted

Top

Window's vertical coordinate, in pixels. Please check TrendAnalysis object's SetWindowPlacement method for more information about the behavior of this parameter, if omitted

Configuration

Informs the content of a configuration saved by TrendAnalysis object's Save method. If omitted or informed an empty String, no previously saved configuration is loaded

ConfigStatus

An optional return parameter that informs the result of loading a TrendAnalysis window. If this method returns True, this parameter contains the value 0 (zero), that is, the configuration was successfully loaded. If this method returns False, this parameter can contain values 1: Configuration did not load correctly, 2: Configuration content is invalid, or 3: Configuration requires a newer version

ErrorDetails

An optional return parameter containing a String with details about the error when loading TrendAnalysis window

 

The next code contains a usage example of this method.

Sub Button1_Click()
  Dim showResult, errorMsg, errorDetails
  showResult = Application.ShowTrendAnalysis("TrendAnalysis", 100, 100, "", ConfigStatus, errorDetails)
  If showResult = False Then
    If ConfigStatus <> 0 Then
      Select Case ConfigStatus
        Case 1
          errorMsg = "Error (1): Configuration did not load correctly."
        Case 2
          errorMsg = "Error (2): Configuration content is invalid."
        Case 3
          errorMsg = "Error (3): Configuration requires a newer version."
      End Select
      errorMsg = errorMsg & vbCrLf & "Details: " & errorDetails
      MsgBox errorMsg
    End If
  End If
End Sub

 

NOTE

TrendAnalysis properties can be configured in the object returned by Viewer's GetTrendAnalysis method.

Was this page useful?