Delphi abc
1. ×Ö·û´®Á¬½ÓÖ±½ÓÓÃ+£¬ÓëJavaºÍPythonÖеÄÏàͬ
2. Ö´ÐÐÍⲿÃüÁîʹÓÃwinexec£¬ShellExecute
eg. ShellExecute(0, 'open', 'jre/bin/java', '-lang zh-CN', 'E:\myfolder', SW_SHOW);
3. ÅжÏÎļþ¡¢Îļþ¼ÐÊÇ·ñ´æÔÚ
FileExists('C:\Users\bill\somefile.txt')
DirectoryExits('C:\WINDOWS')
4. if else ½á¹¹
if FileExists(Edit1.Text) then
begin
....
end // ²»¿É¼Ó·ÖºÅ
else if DirectoryExits('Edit1.Text') then
begin
....
end // ²»¿É¼Ó·ÖºÅ
else
begin
....
end;
5. »ñÈ¡ÆÁÄ»¿í¶È¸ß¶ÈÖ±½ÓʹÓà Screen.Width Screen.Height
6. ÉèÖô°¿ÚλÖà SetBounds(left. top, width, height)
Ïà¹ØÎĵµ£º
1¡¢ ϵͳ¹¦ÄÜ
1£©¡¢Êý¾ÝѹËõ
ʹÓÃDELPHIÌṩµÄÁ½¸öÁ÷ÀࣨTCompressionStreamºÍTDecompressionStream£©À´Íê³ÉÊý¾ÝµÄѹËõºÍ½âѹËõ¡£
2£©¡¢Êý¾Ý¼ÓÃÜѹËõ
ͨ¹ýDelphi±à³ÌÖГÁ÷”µÄÓ¦ÓÃʵÏÖÊý¾Ý¼ÓÃÜ£¬Ö÷Òª²ÉÓÃTstreamµÄÁ½¸öÅÉÉúÀàTfilestream¡¢Tmemorystream À´Íê³ÉµÄ£»ÆäÖÐÊý¾ÝѹËõ²¿·Ö²ÉÓÃ1£©µÄʵÏÖ· ......
ö¾ÙÀàÐÍ
¡¡¡¡Pascal³ÌÐò²»½öÓÃÓÚÊýÖµ´¦Àí£¬»¹¸ü¹ã·ºµØÓÃÓÚ´¦Àí·ÇÊýÖµµÄÊý¾Ý¡£ÀýÈ磬ÐÔ±ð¡¢Ô·ݡ¢ÐÇÆÚ¼¸¡¢ÑÕÉ«¡¢µ¥Î»Ãû¡¢Ñ§Àú¡¢Ö°ÒµµÈ¡£
1¡¢Ã¶¾ÙÀàÐ͵͍Òå
¸ñʽ:¡¡type ö¾ÙÀàÐͱêʶ·û=(±êʶ·û1,±êʶ·û2,¡,±êʶ·ûn)
2¡¢Ã¶¾ÙÀàÐÍÊý¾ÝÌØµã
¢Ù ö¾ÙÔªËØÖ»ÄÜÊDZêʶ·û£»
ÀýÈ磬ÏÂÁÐÀàÐͶ¨ÒåÊǺϷ¨µÄ£º
¡¡ ......
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
......
type
TTurboRecord = record
strict private
fNameValue : integer;
function GetName: string;
public
NamePrefix : string;
constructor Create(const initNameValue : integer) ;
property Name : string read GetName;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TlHelp32;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Pub ......