Spread Windows Forms 11.0 Product Documentation
SystemSoundType Enumeration
Example Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : SystemSoundType Enumeration
Specifies a system sound type which relates to a System.Media.SystemSound.
Syntax
'Declaration
 
Public Enum SystemSoundType 
   Inherits System.Enum
'Usage
 
Dim instance As SystemSoundType
public enum SystemSoundType : System.Enum 
Members
MemberDescription
AsteriskSpecifies the System.Media.SystemSounds.Asterisk sound.
BeepSpecifies the System.Media.SystemSounds.Beep sound.
ExclamationSpecifies the System.Media.SystemSounds.Exclamation sound.
HandSpecifies the System.Media.SystemSounds.Hand sound.
QuestionSpecifies the System.Media.SystemSounds.Question sound.
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)
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.SystemSoundType

See Also

Reference

FarPoint.Win.Spread Namespace
SoundNotify Class