Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / SystemSoundType Enumeration
Example Example


In This Topic
    SystemSoundType Enumeration
    In This Topic
    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