Code and Coder: about .net core, C#, Delphi, Codetyphon, Freepascal, C++,Python, website technical records


Memory management in Delphi[3]

Demo of Memory management in Delphi[3]

Memory management in Delphi[2]

Demo of Memory management in Delphi[2]

Memory management in Delphi[1]

Demo of Memory management in Delphi[1]

Capturing a Full Screen Image in Delphi

Demo of Capturing a Full Screen Image in Delphi

Windows Multimedia Functions (functions in winmm.dll) Summary

function                                            Introduction auxGetDevCaps Query the specified auxiliary output device to determine its performance auxGetNumDevs Number of auxiliary output devices present in the retrieval system auxGetVolume Returns the current volume device for the specified auxiliary output device auxOutMessage Send a message to the specified auxiliary output device auxSetVolume Sets the volume in the specified auxiliary output device CloseDirver Close the specif...

WinAPI_ ExtractIcon-Get Icons in EXE, DLL in Delphi

//statement: ExtractIcon (   hInst: HINST;          {program instance calling function}   lpszExeFileName: PChar; {file path; file can be * .exe, * .dll, * .ico}   nIconIndex: UINT        {icon index} ): HICON; {return the icon handle; return the first icon handle when index is 0; return the total number of icons when index is #FFFFFFFF // Example: unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, ExtCtrls; type   TForm1 =class (...

Use {$ INCLUDE} or {$ I} instructions to manage and call custom functions in Delphi

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs; type   TForm1 =class (TForm)     procedure FormCreate (Sender: TObject);   end ; var   Form1: TForm1; implementation {$ R * .dfm} // For example, the following four custom functions ***************************** function MyAdd (const a, b: Integer): Integer; begin   Result: = a + b; end ; function MyDec (const a, b: Integer): Integer; begin   Result: = a-b; end ; function MyMul (con...

How to Hide desktop icons and taskbars in Delphi

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls; type   TForm1 =class (TForm)     CheckBox1: TCheckBox;     CheckBox2: TCheckBox;     procedure FormCreate (Sender: TObject);     procedure CheckBox1Click (Sender: TObject);     procedure CheckBox2Click (Sender: TObject);   end ; var   Form1: TForm1; implementation {$ R * .dfm} {initialization} procedure TForm1.FormCreate (Sender: TObject); begin   CheckBox1.Caption: ='Hi...

How to Drag a form without a title bar in Delphi

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs; type   TForm1 = class(TForm)     procedure FormMouseDown(Sender: TObject; Button: TMouseButton;       Shift: TShiftState; X, Y: Integer);     procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);     procedure FormMouseUp(Sender: TObject; Button: TMouseButton;       Shift: TShiftState; X, Y: Integer);   end; where   Form1: TForm1; implementation {$R *.dfm} w...

WinAPI WinExec-Run external programs in Delphi

//statement WinExec (   lpCmdLine: LPCSTR; {file name and parameters; if no path is specified, it will be searched in the following order: program directory / current directory / System32 / Windows / PATH environment variable}   uCmdShow: UINT    {startup option} ): UINT; //return value: more than the 31                    {Call success} equal 0                    {Not enough storage} ERROR_FILE_NOT_FOUND = 2;  {File name error} ERROR_PATH_NOT_FOUND = 3;  {Path name error} ERROR_BAD_FORMAT = 11; {EXE f...