Copyright © 2006-2018 MultiMedia Soft

WaveformAnalyzer.GraphicItemVerticalLineAdd method

Previous pageReturn to chapter overviewNext page



Adds a new vertical line that will be displayed over the waveform's graphics.


On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its own set of properties, positions and buddy text:



This line can be manually moved on the screen in one of the following ways:

through code using the WaveformAnalyzer.GraphicItemHorzPositionSet method
through the mouse, causing a sequence of WaveAnalyzerLineMoveBegin, WaveAnalyzerLineMoving and WaveAnalyzerLineMoveEnd events to be generated.

During playback of the loaded sound, the WaveAnalyzerLineReached event is generated when playback position reaches the position of the vertical line.


This method fails if no sound is currently loaded into the editor.

The vertical line is automatically destroyed, as all of the other existing graphic items, when the loaded sound is discarded from memory through the RecordedSound.FreeMemory method.


A vertical line can be removed through the WaveformAnalyzer.GraphicItemRemove method and hidden or shown through the WaveformAnalyzer.GraphicItemShow method.


For details about graphic items management on the waveform analyzer refer to the How to add graphic items to the Waveform analyzer section.

For details about the use of the Waveform Analyzer refer to the How to use the Waveform Analyzer section.

For further details about methods of the Waveform Analyzer refer to the WaveformAnalyzer object section.





[Visual Basic]

control.WaveformAnalzyer.GraphicItemVerticalLineAdd (

strFriendlyName as String,

strDescription as String,

nPositionInMs as Long,

settings as Long

) as Integer




short control.WaveformAnalzyer.GraphicItemVerticalLineAdd (

LPCTSTR strFriendlyName,

LPCTSTR strDescription,

long nPositionInMs,

void *settings









Friendly name of the line.

This friendly name can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemNameGet and WaveformAnalyzer.GraphicItemNameSet methods.


Description of the line.

This description can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemDescriptionGet and WaveformAnalyzer.GraphicItemDescriptionSet methods.


Position of the line expressed in milliseconds.

This position can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemHorzPositionGet and WaveformAnalyzer.GraphicItemHorzPositionSet methods.


Address of a structure of type WANALYZER_VERTICAL_LINE that contains the settings for the new line.

These settings can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemVerticalLineParamsGet and WaveformAnalyzer.GraphicItemVerticalLineParamsSet methods.

By setting this value to 0 the graphic item will be rendered with default setting.



Return value







An error occurred (see the LastError property for further error details)

Value > 0

Unique identification number assigned to this new line.