Skip to main content

AccessTr.neT


geri sayım

ondercesmeci
ondercesmeci
2
1883

geri sayım

Çözüldü #1
Arkadaşlar merhaba.
butona bastığımda geri sayım başlıyor, bitincede sesi çalıyor.
benim istediğim ise ek olarak son 5 sn kalınca her saniyede uyaran bip sesi çalması ve yukarıda yazdığım şekilde bitmesi. kodu aşağıda gönderdim
ilginize ve bilginize teşekkür ederim.
Private Declare Function sndPlaySound Lib "winmm.dll" _
Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" _
(ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long) As Long

' Sound Flag
Private Const SOUND_FILENAME = &H20000


Private Sub CommandButton1_Click()
Dim PauseTime, Start, Finish, TotalTime, x, Retval
For x = 30 To 0 Step -1
Me.TextBox1.Text = Str(x)
PauseTime = 1 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop

Next x
Debug.Print PlaySoundFileB("C:\WINDOWS\Media\tada.wav")


End Sub

Public Function PlaySoundFileB(ByVal sndFileName As String) As Boolean

Dim iSuccess As Integer
iSuccess = PlaySound(sndFileName, 0&, SOUND_FILENAME)
If iSuccess = 0 Then
PlaySoundFileB = False
Else
PlaySoundFileB = True
End If

End Function
ondercesmeci, 15-06-2010 tarihinden beri AccessTr.neT Ãœyesidir.
Cevapla
Çözüldü #2
For x = 30 To 0 Step -1
Me.Text1 = str(x)
If Me.Text1 <= 5 Then Debug.Print PlaySoundFileB("C:\WINDOWS\Media\Windows Ding.wav")

PauseTime = 1 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop

Next x
Debug.Print PlaySoundFileB("C:\WINDOWS\Media\tada.wav")
Murat YANDEMİR ( PyramiD YAZILIM Uluslar Arası Nakliye Programları )
Bilgisayar Programcısı (1989'dan beri)

+rep Yollar biter Access bitmez. +rep
Cevapla
Çözüldü #3
Sn. Yandemir
İlginize ve bilginize çok teşekkür ederim.
ondercesmeci, 15-06-2010 tarihinden beri AccessTr.neT Ãœyesidir.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da