Slide # 1

Slide # 1

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 2

Slide # 2

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 3

Slide # 3

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 4

Slide # 4

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Slide # 5

Slide # 5

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts Read More

Pages

Jumat, 31 Oktober 2014

Membuat nada beep di vb6

Mengenai cara membuat suara beep seperti yang terdapat pada antivirus Avira menggunakan VB6 Code - Pada saat mendeteksi sebuah virus/malware, biasanya anti virus Avira akan mengeluarkan suara yang khas melalui internal speaker. Nah, di bawah ini merupakan cara membuat sound beep ala Avira dengan memanggil fungsi API Beep yang terdapat pada liblary Kernel32. Cobalah untuk mengkalibrasi frekuensi serta durasinya!
Option Explicit 

Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, 
ByVal dwDuration As Long) As Long 

Private Sub AvirasBeep() 
    Beep 1500, 100 'frekuensi 1500khz, durasi 100 milidetik 
    Beep 2000, 80 'frekuensi 2000khz, durasi 80 milidetik 
    Beep 3200, 70 'frekuensi 3200khz, durasi 70 milidetik 
End Sub 

Private Sub Command1_Click() 
    AvirasBeep 
End Sub