This article describes the Delphi method of making WAV files. Share to everyone for your reference. Specifically as follows:
Here Delphi with WaveIn ... function to make WAV files
The specific code is as follows:
Use a window to accept messages from an audio device: unit Unit1;
Interface uses Windows, Messages, sysutils, variants, Classes, Graphics, Controls, Forms, Dialogs, Stdctrls;
Type TFORM1 = Class (Tform) Button1:tbutton;
Button2:tbutton;
Button3:tbutton;
Procedure For
Inetisoffline function in URL.DLL needs to be introduced.Function declared as:function Inetisoffline (Flag:integer): Boolean; stdcall; External ' URL. DLL ';Then you can call the function to determine if the system is connected to the InternetIf Inetisoffline (0) then ShowMessage (' Not connected! ')else ShowMessage (' connected! ');This function returns True if the local system is not connected to the Internet.Report:Most systems equipped with IE or OFFICE97 have this DLL available for invocat
program not only can control an optical drive, but also can selectively control an optical drive and all optical drive open and close, this to those who operate multiple optical drive and lazy to bend computer person indeed will be convenient many.
Programming Ideas
Programming Ideas: Control the optical drive through pop-up menus and events.
1, the Realization of pop-up menu
Run Delphi and create a new project, in the uses part of the reference registry,
Windows 95/NT provides rich multimedia service functions, including a large number of low-level to advanced multimedia API functions. With these powerful APIs, you can write multimedia applications at different levels. You can write a book about multimedia services. This section briefly introduces some of the most commonly used multimedia services.
When developing multimedia applications using Visual C ++, you must include mmsystem in all source progr
replaced by a number.
If (! (Pfile = fopen (szfilename, "WB "))){Return internet_error_fileopen;}This call opens a file based on the given file name. If it fails, another user-defined error is returned.
DWORD dwbytetoread = 0;DWORD dwsizeofrq = 4;DWORD dwbytes = 0;These three values respectively store the file size, the size of httpqueryinfo content, and the total number of bytes read.
If (! Httpqueryinfo (hconnect, http_query_content_length | http_query_flag_number, (lpvoid) dwbytetoread, dw
is not the actual execution time of a function or algorithm, because it is impossible for the function and algorithm thread to occupy the CPU all the time. It is the same for all functions that determine the execution time, but it is basically accurate, you can perform regular queries. The gettickcount () and clock () functions require realTime Clock time, with interruptions and latency issues.
Precision: WindowsNTThe precision of 3.5 and later versions is 10 ms, and its time precision is hig
Before dynamically generating a form based on the. DFM file, you must register the classes used in the form.
You must register these control objects before using the control objects in the form in the script.
Unit uclass;{$ Define ehlib}{$ Define raize}{$ Define dbanywhere}{$ Define TMS}Interface
UsesWindows, messages, sysutils, variants, classes, graphics, controls, forms,Dialogs, stdctrls, comctrls, contnrs,ActiveX,Actnlist,ADODB, DB,Buttons,Clipbrd,Commctrl,Comobj,Comserv,Dateutils,Dbctrls,D
button1click (Sender: tobject); Procedure destroy (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} uses mmsystem; {sndplaysound declaration in this unit} const S = 'C: \ windows \ media \ Windows XP start .wav '; // play procedure tform1.button1click (Sender: tobject) synchronously ); begin sndplaysound (S, snd_sync); beep; {this sentence will be executed after playing} end; // procedure tform1.button2click (Sender: tobject); be
Original article address:Common types and definitions of Delphi
Frequently-used types and definitions of Delphi-Summary: sndplaysound mmsystem
Type
Unit
Date
Sysutils
Deletefile
Sysutils or Windows (different versions)
Dispatchinvokeerror
Comobj
DWORD
Windows
Edatabaseerror
DB
Encodedatetime
Dateutils
_ Stream
Adodb_tlb
Aktop, akleft, akright, akbo
of # ifdef Android, which is strange.
### Replace driver_wext.c in external/wpa_supplicant in DonutRe-compile mm to get:Wpa_supplicant --- vvv3$ Or not
### 22th, JulCopy the donut wpa_supplicant folder to eclair.Compiled with mmSystem/bin/wpa_cli --- vvvvv4System/bin/wpa_supplicant --- vvv4System/lib/libwpa_client.so --- vvv4Wpa_supplicant --- vvv3Finally, you can find the network.However, the IP address cannot be obtained.
Logcat prompt:I/wifistatet
is terminated. When sndplaysound is used, the header file # include "mmsystem. H "and load the library file winmm. lib
Data Interaction Between dialog boxes: During the game: we will use the custom dialog box to win and save the dialog box ranking dialog box. How can we exchange data between them? As the interaction between these dialog boxes is simple, it only involves some simple data exchanges. in the program, you can set some get and set function
Seeing perfect mm asking for such a DOS command in windows, I found no, so I excerpted the following code and compiled a console program.
Unit unit1;InterfaceUses mmsystem, dialogs;Type tdevicename = (master, microphone, waveout, Synth );Procedure setvolumemute (DN: tdevicename; Value: Boolean );ImplementationProcedure setvolumemute (DN: tdevicename; Value: Boolean );VaRHmix: hmixer;Mxlc: mixerlinecontrols;Mxcd: tmixercontroldetails;Vol: tmixercontrol
determine the execution time of the function by entering the function start time and by the end time of the function exit. This time is not the actual execution time of the function or algorithm, because it is impossible for the function and algorithm thread to occupy the CPU all the time, all the functions that determine the execution time are the same, but they are basically accurate and can be scheduled through queries. The gettickcount () and clock () functions ask the motherboard BIOS for
To control the pop-up and close of the CD-ROM In the Delphi Program, you can use the media control interface function of the mmsystem. Pas unit. Two functions can achieve the same effect. One is the mcisendcommand function, and the other is the mcisendstring function. The opencddrive functions written using these two functions are as follows.
1. Use mcisendcommand:Function opencddrive (isopen: Boolean; drivename: Char = #0): Boolean;
VaR
OP: tmci_open
execution time of the function by entering the function start time and by the end time of the function exit. This time is not the actual execution time of the function or algorithm, because it is impossible for the function and algorithm thread to occupy the CPU all the time, all the functions that determine the execution time are the same, but they are basically accurate and can be scheduled through queries. The GetTickCount () and Clock () functions ask the motherboard BIOS for real time cloc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.