Desktop Functions: Smart Device Functions:
|
Search Results for "Beep" in [All]user321: MessageBeep
static extern bool MessageBeep(beepType uType);
Private Shared Function MessageBeep(ByVal uType As beepType) As Boolean
method public static pinvokeimpl boolean MessageBeep(var uType as integer) With the enum beepType you get intellisense when you type "beep." and you can then select the kind of beep you want. For dylan.NET, use the fields containing the integer values inside the WinSnd class of dnu.dll at http://dylandotnetapps.codeplex.com/
/// Enum type that enables intellisense on the private <see cref="Beep"/> method.
/// Used by the public Beep <see cref="Beep"/></remarks>
public enum beepType : uint
/// A simple windows beep
SimpleBeep = 0xFFFFFFFF,
/// A standard windows OK beep
/// A standard windows Question beep
/// A standard windows Exclamation beep
/// A standard windows Asterisk beep
private static extern bool MessageBeep(uint type);
/// Method to call interop for system beep
/// <remarks>Calls Windows to make computer beep</remarks>
/// <param name="type">The kind of beep you would like to hear</param>
public static void beep(beepType type)
MessageBeep((uint)type); ///////////////// ANOTHER EXAMPLE same as the above but shows all beeps.
public enum beepType
/// A simple windows beep
SimpleBeep = -1,
/// A standard windows OK beep
/// A standard windows Question beep
/// A standard windows Exclamation beep
/// A standard windows Asterisk beep
private static extern bool MessageBeep(uint type);
Class1.beep(beepType.Asterisk);
Class1.beep(beepType.Exclamation);
Class1.beep(beepType.OK);
Class1.beep(beepType.Question);
Class1.beep(beepType.SimpleBeep);
public static void beep(beepType type)
MessageBeep((uint)type); Article http://msdn.microsoft.com/msdnmag/issues/03/07/NET/ ("Calling Win32 DLLs in C# with P/Invoke") gives a helpful wrapper class for MessageBeep. System.Console.Beep coredll2: PlaySound
public static void Beep() {
Play(@"\Windows\Voicbeep"); Enums3: DEVICE_TYPE
FILE_DEVICE_BEEP = 0x01,
FILE_DEVICE_BEEP = &H1 4: SPI
/// Determines whether the warning beeper is on.
/// The pvParam parameter must point to a BOOL variable that receives TRUE if the beeper is on, or FALSE if it is off.
SPI_GETBEEP = 0x0001,
/// Turns the warning beeper on or off. The uiParam parameter specifies TRUE for on, or FALSE for off.
SPI_SETBEEP = 0x0002,
public const uint SPI_GETBEEP = 0x0001;
public const uint SPI_SETBEEP = 0x0002;
SPI_GETBEEP = &H1
SPI_SETBEEP = &H2
/// <summary>On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error).</summary> Structures
/// On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error). ntdllkernel328: Beep
static extern bool Beep(uint dwFreq, uint dwDuration);
Private Shared Function Beep(dwFreq As UInteger, dwDuration As UInteger) As Boolean
Declare Function Lib "kernel32.dll" Alias "Beep" (ByVal dwFrequency As Long, ByVal dwMilliseconds As Long) As Long Unlike MessageBeep, this function is synchronous. (It doesn’t return control to its caller until the sound finishes.)
class BeepSample
static extern bool Beep(uint dwFreq, uint dwDuration);
Beep(i, 5); System.Console.Beep
Beep = 0x00000001, |