Easy language makes the host buzzer ring, easy language and motherboard buzzer

Updated on technology 2024-03-31
3 answers
  1. Anonymous users2024-02-07

    Sets the window transparency (object. Take the window handle (), 0).

    Parameter one is a window handle, such as the startup window. Take the window handle (), which means that the window we want to be transparent is the startup window, and the second parameter is transparency, the value is 0-255, 0 means transparent, 255 means opaque.

    Version 2 supports the library EAPI

    The subroutine Startup Window is created.

    Sets window transparency ( Launches the window. Take the window handle ()50).

    The above are the commands in the easy language, and in the same way, we can also use the api:

    Version 2dll command setlayeredwindowattributes, integers, ,"setlayeredwindowattributes"Set Window Transparency

    Parameter hwnd, integer [window handle].

    Parameter crkey, integer [The color of the mask, which can be specified with rgb(r,g,b)].

    Parameter alpha, byte opacity, value range 0-255

    Parameter dwflags, integer type [transparent mode].

    In addition, two APIs are required:

    Version 2dll command getwindowlong, integer, ,"getwindowlonga"[This function obtains information about the specified window, and the function also obtains a 32-bit integer value for the specified offset address in the extra window memory.] 】

    Parameter hwnd, integer [window handle].

    Parameter nindex, integer type [please check by yourself if there are many contents].

    Version 2dll command setwindowlong, integer, ,"setwindowlonga"[This function changes the properties of the specified window, and the function also sets a specified 32-bit value to the specified offset position of the window's additional storage space].

    Parameter hwnd, integer [window handle].

    Parameter nindex, integer type [please check by yourself if there are many contents].

    Parameter dwnewlong, integer type [please check by yourself if there is more content].

    Also to make the startup window transparent, ** as follows:

    The version 2 subroutine startup window is created.

    Local variable aa, integer.

    aa getwindowlong ( Startup window. Take the window handle ()20).

    aa bit or (aa, 524288).

    setwindowlong ( Launches the window. Take the window handle ()20, aa).

    setlayeredwindowattributes ( Launch window. Take the window handle ()0, 50, 2) and you don't want this.

  2. Anonymous users2024-02-06

    This is a fact that cannot be changed by the dll command beep, logical, ,"beep"

    Parameter dwfreq

    Parameter dwduration

    That's it. Parameter 1 is between sound 1-999.

  3. Anonymous users2024-02-05

    1. Overview.

    To operate the motherboard buzzer, you need to use the Windows API, the API function is in this link library, the interface function is called Beep, Beep has two parameters, one is the frequency (integer, 37Hz-32767Hz), and the other is the duration (in milliseconds).

    Second, the specific operation.

    In Easy Language, you can perform the above functions in the following steps:

    1.Open Easy Language and create an empty program.

    2.Switch the left folder to the "Programs" folder and double-click the "dll command" entry to create a new dll command.

    3.Press Ctrl+N to add a new dll command, and change the command name to "Speaker Sound", the library file name is ", and the corresponding name in the library is"beep", the name of parameter 1 is "frequency", the data type is "integer", and the name of parameter 2 is"Length", and the data type is"Integer", as shown below.

    4.Go back to the form design interface, add a button, and double-click to enter the button events interface.

    Write as follows**.

    5.Click Run, and then click the button to view the running effect.

    3. Precautions.

    The API has been tested on the Windows 8 x64 operating system, and has also been tested on WinXP in the past, and other operating systems have not been tested in detail, and the specific availability is unknown.

    Pay the source** for learning and debugging.

    For some laptops, calling this function will output sound from the system speaker (speaker), regardless of whether the sound card driver is installed or not.

    Some machines cannot make sound because the motherboard does not have any electronic devices with sound function (such as some industrial control motherboards, embedded motherboards, etc.).

Related questions
15 answers2024-03-31

Easy language. Ways to close the window:

1. First of all, in the open home page of Easy Language, open the Easy Language software environment. >>>More

10 answers2024-03-31

Hotkey. Registration (Tab 1.)Take the window handle ()0, F1, > register F1 >>>More

9 answers2024-03-31

If you don't change the program, it won't change. Be careful not to confuse the concepts of system and procedure. The QQ** you wear with the SkinSharp program will not change because your computer** is changed to "classic".

15 answers2024-03-31

Doesn't the key wizard come with a footstep?,There's this function.,Find it yourself.。

6 answers2024-03-31

Agree with the upstairs statement that shelling is a good way to do it. As for this tool, you can take a look, but you need to know that it is very likely to be killed and poisoned after packing. It's not very difficult to add shelling, some of them are foolish, just do it all at once or get some sinister tricks, I'll give you an idea. >>>More