ICursors.Create [Method]
- Last UpdatedJul 18, 2023
- 1 minute read
Creates a new TrendCursor at the given location.
Defined As
-
[VBA] Object Create(name As String, position As Integer)
-
[Cicode] OBJECT Create(STRING name, INT position)
-
[C++] HRESULT Create(BSTR name, int position, ITrendCursor** ppTrendCursor)
Parameters
name
[in] The desired unique name of the new cursor. This needs to be between 1 and 250 characters.
position
[in] The initial position of the new cursor. This value is given as the number of pixels from the left of the Process Analyst graph view.
Execution Result
If the function succeeds, the return value will be Success. If the name is out of range, the return value will be InvalidArgument. If the name is not unique, the return value will be InvalidArgument.
If an unexpected error occurs, the return value will be GeneralFailure.
Remarks
The cursor name needs to be unique. Attempting to create a cursor with a name that is already in use will result in error and the new cursor will not be created.
Calling Syntax
[VBA]
Sub Example(cursors As Object)
Dim newCursor As Object
newCursor = cursors.Create("Cursor1", 100)
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursors)
OBJECT hNewCursor = _ObjectCallMethod(hCursors, "Create", "Cursor1", 100);
END