Spread Windows Forms 11.0 Product Documentation
SoundLocation Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SoundNotify Class : SoundLocation Property
Gets or sets the sound file location.
Syntax
'Declaration
 
Public Property SoundLocation As String
'Usage
 
Dim instance As SoundNotify
Dim value As String
 
instance.SoundLocation = value
 
value = instance.SoundLocation
public string SoundLocation {get; set;}

Property Value

The sound location. The default is String.Empty.
Remarks
If this property is set, the SoundType property will not have an effect, even if this sound file location is invalid. Only .wav files are supported.
Example
This example uses the sound notification.
//Type a value in cell 1,1
FarPoint.Win.Spread.SoundNotify sound = new FarPoint.Win.Spread.SoundNotify();
sound.SoundLocation = "C:\\Program Files (x86)\\GrapeCity\\10sec.wav";
FarPoint.Win.Spread.CompareStringValidator svalid = new FarPoint.Win.Spread.CompareStringValidator();
svalid.ComparedOperator = FarPoint.Win.Spread.CompareStringValidatorOperator.Contains;
svalid.ComparedString = "Test";
svalid.Actions.Add(sound);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), svalid);
'Type a value in cell 1,1
Dim sound As New FarPoint.Win.Spread.SoundNotify()
sound.SoundLocation = "C:\Program Files (x86)\GrapeCity\10sec.wav"
Dim svalid As New FarPoint.Win.Spread.CompareStringValidator()
svalid.ComparedOperator = FarPoint.Win.Spread.CompareStringValidatorOperator.Contains
svalid.ComparedString = "Test"
svalid.Actions.Add(sound)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), svalid)
See Also

Reference

SoundNotify Class
SoundNotify Members