Real Software Forums

System Alert Flash [OSX Only]
Page 1 of 1

Author:  mauitom [ Sun Jun 20, 2010 10:40 pm ]
Post subject:  System Alert Flash [OSX Only]

On a Mac, as of OS X 10.5, a nifty system alert was added that allows you to flash your screen. If you have an app where the user might have the sound off or if they are hearing impaired, you have a way to get your users attention. Think of this method as an alternative to Rb's Beep() call.

Sub FlashScreenAlert()
// OS X only, 10.5 and greater.
Dim kSystemSoundID_FlashScreen As Integer = &h00000FFE

Soft Declare Sub AudioServicesPlayAlertSound Lib "AudioToolbox.framework" (inSystemSound As Integer)
AudioServicesPlayAlertSound kSystemSoundID_FlashScreen
End Sub

You could add this Method to a Module or perhaps the App class of your project.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group