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


WinAPI ShellExecute-open external program or file in Delphi

ShellExecute (   hWnd: HWND;        {Specify parent window handle}   Operation: PChar;  {specified action, for example: open, print}   FileName: PChar;  {Specify a file or program to open}   Parameters: PChar; {Specify parameters for the program to be opened; if the file is opened, it should be nil}   Directory: PChar;  {default directory}   ShowCmd: Integer  {Open option} ): HINST;            {Successful execution will return the application handle; if this value is <= 32, it means an execution error} /...

WebBrowser operation in Delphi

WebBrowser1.GoHome;  // Go to browser default home page WebBrowser1.Refresh;  // Refresh WebBrowser1.GoBack;  // Back WebBrowser1.GoForward;  // forward WebBrowser1.Navigate ('...');  // Open the specified page WebBrowser1.Navigate ('about: blank');  // Open empty page // Open the empty page and write ... WebBrowser1.Navigate ('about: <head> <title> Title </ title> <body> Page content </ body>'); // Read the variables in the web script: procedure TForm1.Button1Click (Sender: TOb...

Structured file access in Delphi

// Operation example: unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls; type   TForm1 = class(TForm)     Memo1: TMemo;     Button1: TButton;     Button2: TButton;     Button3: TButton;     Button4: TButton;     Button5: TButton;     procedure Button1Click(Sender: TObject);     procedure Button2Click(Sender: TObject);     procedure Button3Click(Sender: TObject);     procedure Button4Click(Sender: TObject);     procedure But...

jQuery plugin collection

(File upload) Ajax File Upload jQUploader Multiple File Upload plugin jQuery File Style . Styling an input type file . Progress Bar Plugin . (Form Validation) jQuery Validation . Auto Help . Simple jQuery form validation . jQuery XAV - form validations . jQuery AlphaNumeric . Masked Input . TypeWatch Plugin . Text limiter for form fields . Ajax Username Check with jQuery . (Form - Select Box stuff) jQuery Combobox . jQuery controlled dependent (...

Comparion of HUAWEI ARM64 TaiShan Kunpeng server and Intel Server

background Since the Sino-U.S. Trade conflict, I believe the biggest feeling is not how much tariffs I add to you, but what I have, but I do not sell it to you. "Sale ban" has become the biggest competitiveness in the market economy. It is believed that because of this, Huawei ’s "spare tires turn straight" Kunpeng series chips, once launched, have attracted the attention of the industry. After a long wait, based on Kunpeng 920, Huawei servers representing high-end computing capabilities have begun to ship in large numbers. However, limi...

A set of Delphi entry-level videos

Title                    Description                                         Link #1 Intro to the IDE web • zip #2 Hello World web • zip # 3 Basic Application Development web • zip # 4 Language Introduction web • zip # 5 More Lanugage Intro web • zip # 6 Basic String Manipulation web • zip # 7 Basic Datatypes web • zip #8 Sets web • zip #9 Arrays web • zip # 10 Rec...

TColorToHex and HexToTColor in Delphi

function TColorToHex (Color: TColor):string ; begin   Result: =     IntToHex (GetRValue (Color), 2) +     IntToHex (GetGValue (Color), 2) +     IntToHex (GetBValue (Color), 2); end ; function HexToTColor (sColor:string ): TColor; begin   Result: =   RGB (     StrToInt (# 36 + Copy (sColor, 1, 2)),     StrToInt (# 36 + Copy (sColor, 3, 2)),     StrToInt (# 36 + Copy (sColor, 5, 2))   ); end ; //test: procedure TForm1.Button1Click (Sender: TObject); var   c: TColor;   s: string ; begin   c: = clRed; ...

RGBToHSB in Delphi

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls; type   TForm1 =class (TForm)     Button1: TButton;     procedure Button1Click (Sender: TObject);   end ; var   Form1: TForm1; implementation {$ R * .dfm} uses   Math; type   TRGBColor =record     Red,     Green,     Blue: Byte;   end ;   THSBColor = record     Hue,     Saturnation,     Brightness: Double;   end ; function RGBToHSB (rgb: TRGBColor): T...

Label printing based on Win service (template printing) using dotnet

Several projects have been done recently, and there is a demand for product labeling Basically, there is a card printer, and then the product information is printed on the label. Then use a robot to attach the label to the product The label information includes text, two-dimensional code, bar code and the like, and two-dimensional code and bar code should be generated according to corresponding data. After receiving the demand for printing labels, I started my journey to fill the pits.   Print 3.0 source code: https://g...

How to get the local IP address in Delphi

uses   WinSock; function LocalIP: String; type   TaPInAddr = Array [0..10] of PInAddr;   PaPInAddr = ^ TaPInAddr; var   phe: PHostEnt;   pptr: PaPInAddr;   Buffer: Array [0..63] of AnsiChar;   i: Integer;   GInitData: TWSAData; begin   WSAStartup ($ 101, GInitData);   Result: = '';   GetHostName (Buffer, SizeOf (Buffer));   phe: = GetHostByName (buffer);   if phe =nil then Exit;   pPtr: = PaPInAddr (phe ^ .h_addr_list);   i: = 0;   while pPtr ^ [i] <>nil do   begin     Result: = inet_ntoa (pptr...