|
-
Nov 1st, 2000, 07:55 AM
#1
Thread Starter
Member
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
-
Nov 1st, 2000, 08:04 AM
#2
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
-
Nov 1st, 2000, 08:06 AM
#3
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.
-
Nov 1st, 2000, 08:09 AM
#4
Guru
If you want your application to alert people, the best option is a MsgBox. 
Code:
Call MsgBox("A > B", vbInformation, "Whee")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|