Tekil Mesaj gösterimi
Alt 05-21-2006, 12:42 AM   #7 (permalink)
KaRa_KRaL
Uzman
 
KaRa_KRaL - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Aug 2005
Nerden: Desktop
Mesajlar: 2.129
Tecrübe Puanı: 6 KaRa_KRaL is an unknown quantity at this point
SES BALANS AYARLARI
Wav dosyalarini calarken bunlarin ses balans ayarlariyla oynayabiliriz.

Private Type lVolType
v As Long
End Type

Private Type VolType
lv As Integer
rv As Integer
End Type

Private Declare Function waveOutGetVolume Lib "winmm.dll" _
(ByVal uDeviceID As Long, lpdwVolume As Long) As Long

Private Declare Function waveOutSetVolume Lib "winmm.dll" _
(ByVal uDeviceID As Long, ByVal dwVolume As Long) _
As Long

'WAV dosyasi Cal
Private Declare Function mciSendString Lib "winmm.dll"Alias _
"mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As String, ByVal uReturnLength As _
Long, ByVal hwndCallback As Long) As Long

Private Sub Command3_Click()
Dim i As Long, RS As String, cb As Long, W$
RS = Space$(128)
i = mciSendString("stop sound", RS, 128, cb)
i = mciSendString("close sound", RS, 128, cb)

'Cal
RS = Space$(128)

W$ = "test.wav" 'Calinacak Wav dosyasi
i = mciSendString("open waveaudio!" & W$ & " alias sound", _
RS, 128, cb)
If i Then MsgBox "Hata - Verilen Dosya Bulnamadi."
i = mciSendString("play sound", RS, 128, cb)

VScroll1.SetFocus
End Sub

Private Sub Form_Load()
HScroll1.Value = 0
VScroll1.Value = 2
Form1.Show
VScroll1.SetFocus
End Sub

Private Sub Timer1_Timer()
Dim id As Long, v As Long, i As Long
id = -1

If VScroll1.Value = 1 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 0)
If VScroll1.Value = 1 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, 0)
If VScroll1.Value = 1 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, 0)
If VScroll1.Value = 1 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, 0)
If VScroll1.Value = 1 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, 0)

If VScroll1.Value = 2 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 10280)
If VScroll1.Value = 2 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, 379004968)
If VScroll1.Value = 2 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, 673720360)
If VScroll1.Value = 2 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, 673714578)
If VScroll1.Value = 2 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, 673710080)

If VScroll1.Value = 3 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 20560)
If VScroll1.Value = 3 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, 757944400)
If VScroll1.Value = 3 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, 1347440720)
If VScroll1.Value = 3 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, 1347429155)
If VScroll1.Value = 3 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, 1347420160)

If VScroll1.Value = 4 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 31868)
If VScroll1.Value = 4 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, 1174830204)
If VScroll1.Value = 4 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, 2088533116)
If VScroll1.Value = 4 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, 2088515191)
If VScroll1.Value = 4 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, 2088501248)

If VScroll1.Value = 5 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 42919)
If VScroll1.Value = 5 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, 1582213031)
If VScroll1.Value = 5 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, -1482184793)
If VScroll1.Value = 5 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, -1482208934)
If VScroll1.Value = 5 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, -1482227712)

If VScroll1.Value = 6 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 54227)
If VScroll1.Value = 6 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, 1554895827)
If VScroll1.Value = 6 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, -741092397)
If VScroll1.Value = 6 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, -741122899)
If VScroll1.Value = 6 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, -741146624)

If VScroll1.Value = 7 And HScroll1.Value = -2 Then _
i = waveOutSetVolume(id, 65535)
If VScroll1.Value = 7 And HScroll1.Value = -1 Then _
i = waveOutSetVolume(id, -1878982657)
If VScroll1.Value = 7 And HScroll1.Value = 0 Then _
i = waveOutSetVolume(id, -1)
If VScroll1.Value = 7 And HScroll1.Value = 1 Then _
i = waveOutSetVolume(id, -36865)
If VScroll1.Value = 7 And HScroll1.Value = 2 Then _
i = waveOutSetVolume(id, -65536)
End Sub

SİSTEMDEKİ YAZICILARI OKUMAK
Sistemde kurulu olan bütün yazicilarin listesini cikarabiliriz.

Option Explicit

Private Sub Form_Load()
Dim X%, AA$

For X = 0 To Printers.Count - 1
AA = Printers(X).DeviceName
AA = AA & Space$(35 - Len(AA)) & Printers(X).Port
List1.AddItem AA

If Printer.DeviceName = Printers(X).DeviceName Then
Label1.Caption = "Varsayilan Yazici: " & AA
End If
Next X
End Sub

WINDOWS NE ZAMANDAN BERİ ÇALIŞIYOR?
Windows'un ne zaman acildigini ögrenmek icin gerekli kod.

Option Explicit

Private Declare Function GetTickCount Lib "kernel32" () As Long

Private Sub Timer1_Timer()
Dim H As Single, M As Single, S As Single, MS As Single
Dim strH$, strM$, strS$, strMS$
MS = GetTickCount()
MS = MS / 1000

H = Int(MS / 3600)
MS = MS - H * 3600
M = Int(MS / 60)
MS = MS - M * 60
S = Int(MS)
MS = Int((MS - S) * 10)

strH = CStr(H)
strM = Format(CStr(M), "##00")
strS = Format(CStr(S), "##00")
strMS = CStr(MS)
Label1.Caption = strH & ":" & strM & ":" & strS & ":" & strMS
End Sub

alıntıdır...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
KaRa_KRaL Çevrimdışı   Alıntı ile Cevapla