I need my application to alert people when value a is greater than value b but i am unable to use sound. Is htere any way of getting the application to flash etc
Thanks
Printable View
I need my application to alert people when value a is greater than value b but i am unable to use sound. Is htere any way of getting the application to flash etc
Thanks
To flash a window, use the FlashWindow api function:
Code:Declare Function FlashWindow& Lib "user32" (ByVal hwnd As Long, _
ByVal bInvert As Long)
Declare Function FindWindow& Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String)
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Private Sub Timer1_Timer()
hWin = FindWindow(vbNullString, "Calculator")
If hWin <> 0 Then
hFlash = FlashWindow(hWin, 1)
DoEvents
Sleep (100)
End If
End Sub
Easiest way to have a sound is adding command Beep
Other way is to use API but I'm not at home at the moment so I can't help with that now.
If you want your application to alert people, the best option is a MsgBox. :rolleyes:
Code:Call MsgBox("A > B", vbInformation, "Whee")