Spread Windows Forms 11.0 Product Documentation
SoundType Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SoundNotify Class : SoundType Property
Gets or sets a value that indicates which system sound is played.
Syntax
'Declaration
 
Public Property SoundType As SystemSoundType
'Usage
 
Dim instance As SoundNotify
Dim value As SystemSoundType
 
instance.SoundType = value
 
value = instance.SoundType
public SystemSoundType SoundType {get; set;}

Property Value

A SystemSoundType value. The default is SystemSoundType.Asterisk.
Example
This example plays a sound if the value is invalid.
//Type a value in cell 1,1
FarPoint.Win.Spread.SoundNotify sound = new FarPoint.Win.Spread.SoundNotify();
sound.SoundType = FarPoint.Win.Spread.SystemSoundType.Exclamation;
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.SoundType = FarPoint.Win.Spread.SystemSoundType.Exclamation
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