A program to repel mosquitoes?

Viewed 1969

No, I'm serious.

Recently, I read that when the PC's piezo buzzer is made to vibrate at a certain frequency the sound would repel mosquitoes.

Is that true?

How do I programmatically access the PC buzzer (not the speaker), in C# preferably?

I don't know about mosquitoes, but my head hurts like mad. Argh...!

2 Answers
using System.Runtime.InteropServices;

[DllImport("KERNEL32.DLL",
EntryPoint="Beep",SetLastError=true,CharSet=CharSet.Unicode,
ExactSpelling=true,CallingConvention=CallingConvention.StdCall)]

public static extern bool Beep(int pitch , int duration);

Beep(500,1000); 
Related