Spread Windows Forms 11.0 Product Documentation
SoundNotify Constructor()
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SoundNotify Class > SoundNotify Constructor : SoundNotify Constructor()
Initializes a new instance of the SoundNotify class.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New SoundNotify()
public SoundNotify()
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
Overload List